@posthog/agent 1.0.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 (97) hide show
  1. package/CLAUDE.md +296 -0
  2. package/README.md +142 -0
  3. package/dist/example.d.ts +3 -0
  4. package/dist/example.d.ts.map +1 -0
  5. package/dist/example.js +49 -0
  6. package/dist/example.js.map +1 -0
  7. package/dist/index.d.ts +7 -0
  8. package/dist/index.d.ts.map +1 -0
  9. package/dist/index.js +5 -0
  10. package/dist/index.js.map +1 -0
  11. package/dist/src/agent-registry.d.ts +16 -0
  12. package/dist/src/agent-registry.d.ts.map +1 -0
  13. package/dist/src/agent-registry.js +54 -0
  14. package/dist/src/agent-registry.js.map +1 -0
  15. package/dist/src/agent.d.ts +60 -0
  16. package/dist/src/agent.d.ts.map +1 -0
  17. package/dist/src/agent.js +371 -0
  18. package/dist/src/agent.js.map +1 -0
  19. package/dist/src/agents/execution.d.ts +2 -0
  20. package/dist/src/agents/execution.d.ts.map +1 -0
  21. package/dist/src/agents/execution.js +54 -0
  22. package/dist/src/agents/execution.js.map +1 -0
  23. package/dist/src/agents/planning.d.ts +2 -0
  24. package/dist/src/agents/planning.d.ts.map +1 -0
  25. package/dist/src/agents/planning.js +68 -0
  26. package/dist/src/agents/planning.js.map +1 -0
  27. package/dist/src/event-transformer.d.ts +7 -0
  28. package/dist/src/event-transformer.d.ts.map +1 -0
  29. package/dist/src/event-transformer.js +174 -0
  30. package/dist/src/event-transformer.js.map +1 -0
  31. package/dist/src/file-manager.d.ts +30 -0
  32. package/dist/src/file-manager.d.ts.map +1 -0
  33. package/dist/src/file-manager.js +181 -0
  34. package/dist/src/file-manager.js.map +1 -0
  35. package/dist/src/git-manager.d.ts +49 -0
  36. package/dist/src/git-manager.d.ts.map +1 -0
  37. package/dist/src/git-manager.js +278 -0
  38. package/dist/src/git-manager.js.map +1 -0
  39. package/dist/src/posthog-api.d.ts +48 -0
  40. package/dist/src/posthog-api.d.ts.map +1 -0
  41. package/dist/src/posthog-api.js +110 -0
  42. package/dist/src/posthog-api.js.map +1 -0
  43. package/dist/src/prompt-builder.d.ts +17 -0
  44. package/dist/src/prompt-builder.d.ts.map +1 -0
  45. package/dist/src/prompt-builder.js +75 -0
  46. package/dist/src/prompt-builder.js.map +1 -0
  47. package/dist/src/stage-executor.d.ts +16 -0
  48. package/dist/src/stage-executor.d.ts.map +1 -0
  49. package/dist/src/stage-executor.js +119 -0
  50. package/dist/src/stage-executor.js.map +1 -0
  51. package/dist/src/task-manager.d.ts +25 -0
  52. package/dist/src/task-manager.d.ts.map +1 -0
  53. package/dist/src/task-manager.js +119 -0
  54. package/dist/src/task-manager.js.map +1 -0
  55. package/dist/src/template-manager.d.ts +30 -0
  56. package/dist/src/template-manager.d.ts.map +1 -0
  57. package/dist/src/template-manager.js +118 -0
  58. package/dist/src/template-manager.js.map +1 -0
  59. package/dist/src/types.d.ts +163 -0
  60. package/dist/src/types.d.ts.map +1 -0
  61. package/dist/src/types.js +9 -0
  62. package/dist/src/types.js.map +1 -0
  63. package/dist/src/utils/logger.d.ts +29 -0
  64. package/dist/src/utils/logger.d.ts.map +1 -0
  65. package/dist/src/utils/logger.js +66 -0
  66. package/dist/src/utils/logger.js.map +1 -0
  67. package/dist/src/utils/mcp.d.ts +10 -0
  68. package/dist/src/utils/mcp.d.ts.map +1 -0
  69. package/dist/src/utils/mcp.js +16 -0
  70. package/dist/src/utils/mcp.js.map +1 -0
  71. package/dist/src/workflow-registry.d.ts +11 -0
  72. package/dist/src/workflow-registry.d.ts.map +1 -0
  73. package/dist/src/workflow-registry.js +26 -0
  74. package/dist/src/workflow-registry.js.map +1 -0
  75. package/dist/src/workflow-types.d.ts +45 -0
  76. package/dist/src/workflow-types.d.ts.map +1 -0
  77. package/dist/src/workflow-types.js +2 -0
  78. package/dist/src/workflow-types.js.map +1 -0
  79. package/package.json +61 -0
  80. package/src/agent-registry.ts +60 -0
  81. package/src/agent.ts +428 -0
  82. package/src/agents/execution.ts +53 -0
  83. package/src/agents/planning.ts +67 -0
  84. package/src/event-transformer.ts +189 -0
  85. package/src/file-manager.ts +204 -0
  86. package/src/git-manager.ts +344 -0
  87. package/src/posthog-api.ts +169 -0
  88. package/src/prompt-builder.ts +93 -0
  89. package/src/stage-executor.ts +137 -0
  90. package/src/task-manager.ts +155 -0
  91. package/src/template-manager.ts +149 -0
  92. package/src/templates/plan-template.md +45 -0
  93. package/src/types.ts +223 -0
  94. package/src/utils/logger.ts +79 -0
  95. package/src/utils/mcp.ts +15 -0
  96. package/src/workflow-registry.ts +31 -0
  97. package/src/workflow-types.ts +53 -0
@@ -0,0 +1,371 @@
1
+ import { query } from "@anthropic-ai/claude-agent-sdk";
2
+ import { TaskManager } from './task-manager';
3
+ import { PostHogAPIClient } from './posthog-api';
4
+ import { PostHogFileManager } from './file-manager';
5
+ import { GitManager } from './git-manager';
6
+ import { TemplateManager } from './template-manager';
7
+ import { EventTransformer } from './event-transformer';
8
+ import { PLANNING_SYSTEM_PROMPT } from './agents/planning';
9
+ import { EXECUTION_SYSTEM_PROMPT } from './agents/execution';
10
+ import { Logger } from './utils/logger';
11
+ import { AgentRegistry } from './agent-registry';
12
+ import { WorkflowRegistry } from './workflow-registry';
13
+ import { StageExecutor } from './stage-executor';
14
+ import { PromptBuilder } from './prompt-builder';
15
+ export class Agent {
16
+ workingDirectory;
17
+ onEvent;
18
+ taskManager;
19
+ posthogAPI;
20
+ fileManager;
21
+ gitManager;
22
+ templateManager;
23
+ eventTransformer;
24
+ logger;
25
+ agentRegistry;
26
+ workflowRegistry;
27
+ stageExecutor;
28
+ debug;
29
+ constructor(config = {}) {
30
+ this.workingDirectory = config.workingDirectory || process.cwd();
31
+ this.onEvent = config.onEvent;
32
+ this.debug = config.debug || false;
33
+ this.logger = new Logger({ debug: this.debug, prefix: '[PostHog Agent]' });
34
+ this.taskManager = new TaskManager();
35
+ this.eventTransformer = new EventTransformer();
36
+ this.fileManager = new PostHogFileManager(this.workingDirectory, this.logger.child('FileManager'));
37
+ this.gitManager = new GitManager({
38
+ repositoryPath: this.workingDirectory,
39
+ logger: this.logger.child('GitManager')
40
+ // TODO: Add author config from environment or config
41
+ });
42
+ this.templateManager = new TemplateManager();
43
+ this.agentRegistry = new AgentRegistry();
44
+ if (config.posthogApiUrl && config.posthogApiKey) {
45
+ this.posthogAPI = new PostHogAPIClient({
46
+ apiUrl: config.posthogApiUrl,
47
+ apiKey: config.posthogApiKey,
48
+ });
49
+ }
50
+ this.workflowRegistry = new WorkflowRegistry(this.posthogAPI);
51
+ const promptBuilder = new PromptBuilder({
52
+ getTaskFiles: (taskId) => this.getTaskFiles(taskId),
53
+ generatePlanTemplate: (vars) => this.templateManager.generatePlan(vars),
54
+ logger: this.logger.child('PromptBuilder')
55
+ });
56
+ this.stageExecutor = new StageExecutor(this.agentRegistry, this.logger, promptBuilder);
57
+ }
58
+ /**
59
+ * Enable or disable debug logging
60
+ */
61
+ setDebug(enabled) {
62
+ this.debug = enabled;
63
+ this.logger.setDebug(enabled);
64
+ }
65
+ // Workflow-based execution
66
+ async runWorkflow(taskOrId, workflowId, options = {}) {
67
+ const task = typeof taskOrId === 'string' ? await this.fetchTask(taskOrId) : taskOrId;
68
+ await this.workflowRegistry.loadWorkflows();
69
+ const workflow = this.workflowRegistry.getWorkflow(workflowId);
70
+ if (!workflow) {
71
+ throw new Error(`Workflow ${workflowId} not found`);
72
+ }
73
+ // Ensure task is assigned to workflow and positioned at first stage
74
+ if (this.posthogAPI) {
75
+ try {
76
+ if (task.workflow !== workflowId) {
77
+ await this.posthogAPI.updateTask(task.id, { workflow: workflowId });
78
+ task.workflow = workflowId;
79
+ }
80
+ if (!task.current_stage && workflow.stages.length > 0) {
81
+ const firstStage = [...workflow.stages].sort((a, b) => a.position - b.position)[0];
82
+ await this.posthogAPI.updateTaskStage(task.id, firstStage.id);
83
+ task.current_stage = firstStage.id;
84
+ }
85
+ }
86
+ catch (e) {
87
+ this.logger.warn('Failed to sync task workflow/stage before execution', { error: e.message });
88
+ }
89
+ }
90
+ const executionId = this.taskManager.generateExecutionId();
91
+ this.logger.info('Starting workflow execution', { taskId: task.id, workflowId, executionId });
92
+ this.taskManager.startExecution(task.id, 'plan_and_build', executionId);
93
+ try {
94
+ const orderedStages = [...workflow.stages].sort((a, b) => a.position - b.position);
95
+ let startIndex = 0;
96
+ const currentStageId = task.current_stage;
97
+ // If task is already at the last stage, fail gracefully without progressing
98
+ if (currentStageId) {
99
+ const currIdx = orderedStages.findIndex(s => s.id === currentStageId);
100
+ const atLastStage = currIdx >= 0 && currIdx === orderedStages.length - 1;
101
+ if (atLastStage) {
102
+ this.emitEvent(this.eventTransformer.createStatusEvent('no_next_stage', { stage: orderedStages[currIdx].key }));
103
+ this.taskManager.completeExecution(executionId, { task, workflow });
104
+ return { task, workflow };
105
+ }
106
+ }
107
+ if (options.resumeFromCurrentStage && currentStageId) {
108
+ const idx = orderedStages.findIndex(s => s.id === currentStageId);
109
+ if (idx >= 0)
110
+ startIndex = idx;
111
+ }
112
+ // Align server-side stage when restarting from the beginning
113
+ if (this.posthogAPI) {
114
+ const targetStage = orderedStages[startIndex];
115
+ if (targetStage && targetStage.id !== currentStageId) {
116
+ try {
117
+ await this.posthogAPI.updateTaskStage(task.id, targetStage.id);
118
+ task.current_stage = targetStage.id;
119
+ }
120
+ catch { }
121
+ }
122
+ }
123
+ for (let i = startIndex; i < orderedStages.length; i++) {
124
+ const stage = orderedStages[i];
125
+ await this.executeStage(task, stage, options);
126
+ if (options.autoProgress) {
127
+ const hasNext = i < orderedStages.length - 1;
128
+ if (hasNext) {
129
+ await this.progressToNextStage(task.id);
130
+ }
131
+ }
132
+ }
133
+ this.taskManager.completeExecution(executionId, { task, workflow });
134
+ return { task, workflow };
135
+ }
136
+ catch (error) {
137
+ this.taskManager.failExecution(executionId, error);
138
+ throw error;
139
+ }
140
+ }
141
+ async executeStage(task, stage, options = {}) {
142
+ this.emitEvent(this.eventTransformer.createStatusEvent('stage_start', { stage: stage.key }));
143
+ const overrides = options.stageOverrides?.[stage.key];
144
+ const agentName = stage.agent_name || 'code_generation';
145
+ const agentDef = this.agentRegistry.getAgent(agentName);
146
+ const isManual = stage.is_manual_only === true;
147
+ const stageKeyLower = (stage.key || '').toLowerCase().trim();
148
+ const isPlanningByKey = stageKeyLower === 'plan' || stageKeyLower.includes('plan');
149
+ const isPlanning = !isManual && ((agentDef?.agent_type === 'planning') || isPlanningByKey);
150
+ const shouldCreatePlanningBranch = overrides?.createPlanningBranch !== false; // default true
151
+ const shouldCreateImplBranch = overrides?.createImplementationBranch !== false; // default true
152
+ if (isPlanning && shouldCreatePlanningBranch) {
153
+ const planningBranch = await this.createPlanningBranch(task.id);
154
+ await this.updateTaskBranch(task.id, planningBranch);
155
+ this.emitEvent(this.eventTransformer.createStatusEvent('branch_created', { stage: stage.key, branch: planningBranch }));
156
+ }
157
+ else if (!isPlanning && !isManual && shouldCreateImplBranch) {
158
+ const implBranch = await this.createImplementationBranch(task.id);
159
+ await this.updateTaskBranch(task.id, implBranch);
160
+ this.emitEvent(this.eventTransformer.createStatusEvent('branch_created', { stage: stage.key, branch: implBranch }));
161
+ }
162
+ const result = await this.stageExecutor.execute(task, stage, options);
163
+ if (result.plan) {
164
+ await this.writePlan(task.id, result.plan);
165
+ await this.commitPlan(task.id, task.title);
166
+ this.emitEvent(this.eventTransformer.createStatusEvent('commit_made', { stage: stage.key, kind: 'plan' }));
167
+ }
168
+ if (isManual) {
169
+ const defaultOpenPR = true; // manual stages default to PR for review
170
+ const openPR = overrides?.openPullRequest ?? defaultOpenPR;
171
+ if (openPR) {
172
+ // Ensure we're on an implementation branch for PRs
173
+ let branchName = await this.gitManager.getCurrentBranch();
174
+ const onTaskBranch = branchName.includes(`posthog/task-${task.id}`);
175
+ if (!onTaskBranch && (overrides?.createImplementationBranch !== false)) {
176
+ const implBranch = await this.createImplementationBranch(task.id);
177
+ await this.updateTaskBranch(task.id, implBranch);
178
+ branchName = implBranch;
179
+ this.emitEvent(this.eventTransformer.createStatusEvent('branch_created', { stage: stage.key, branch: implBranch }));
180
+ }
181
+ try {
182
+ const prUrl = await this.createPullRequest(task.id, branchName, task.title, task.description);
183
+ await this.updateTaskBranch(task.id, branchName);
184
+ await this.attachPullRequestToTask(task.id, prUrl);
185
+ this.emitEvent(this.eventTransformer.createStatusEvent('pr_created', { stage: stage.key, prUrl }));
186
+ }
187
+ catch { }
188
+ }
189
+ // Do not auto-progress on manual stages
190
+ this.emitEvent(this.eventTransformer.createStatusEvent('stage_complete', { stage: stage.key }));
191
+ return;
192
+ }
193
+ if (result.results) {
194
+ const existingPlan = await this.readPlan(task.id);
195
+ const planSummary = existingPlan ? existingPlan.split('\n')[0] : undefined;
196
+ await this.commitImplementation(task.id, task.title, planSummary);
197
+ this.emitEvent(this.eventTransformer.createStatusEvent('commit_made', { stage: stage.key, kind: 'implementation' }));
198
+ }
199
+ // PR creation on complete stage (or if explicitly requested), regardless of whether edits occurred
200
+ {
201
+ const defaultOpenPR = stage.key.toLowerCase().includes('complete');
202
+ const openPR = overrides?.openPullRequest ?? defaultOpenPR;
203
+ if (openPR) {
204
+ const branchName = await this.gitManager.getCurrentBranch();
205
+ try {
206
+ const prUrl = await this.createPullRequest(task.id, branchName, task.title, task.description);
207
+ await this.updateTaskBranch(task.id, branchName);
208
+ await this.attachPullRequestToTask(task.id, prUrl);
209
+ this.emitEvent(this.eventTransformer.createStatusEvent('pr_created', { stage: stage.key, prUrl }));
210
+ }
211
+ catch { }
212
+ }
213
+ }
214
+ this.emitEvent(this.eventTransformer.createStatusEvent('stage_complete', { stage: stage.key }));
215
+ }
216
+ async progressToNextStage(taskId) {
217
+ if (!this.posthogAPI)
218
+ throw new Error('PostHog API not configured. Cannot progress stage.');
219
+ await this.posthogAPI.progressTask(taskId, { auto: true });
220
+ }
221
+ // Direct prompt execution - still supported for low-level usage
222
+ async run(prompt, options = {}) {
223
+ const baseOptions = {
224
+ model: "claude-4-5-sonnet",
225
+ cwd: options.repositoryPath || this.workingDirectory,
226
+ permissionMode: options.permissionMode || "default",
227
+ settingSources: ["local"],
228
+ };
229
+ const response = query({
230
+ prompt,
231
+ options: { ...baseOptions, ...(options.queryOverrides || {}) },
232
+ });
233
+ const results = [];
234
+ for await (const message of response) {
235
+ this.logger.debug('Received message in direct run', { type: message.type });
236
+ const transformedEvent = this.eventTransformer.transform(message);
237
+ this.onEvent?.(transformedEvent);
238
+ results.push(message);
239
+ }
240
+ return { results };
241
+ }
242
+ // PostHog task operations
243
+ async fetchTask(taskId) {
244
+ this.logger.debug('Fetching task from PostHog', { taskId });
245
+ if (!this.posthogAPI) {
246
+ const error = new Error('PostHog API not configured. Provide posthogApiUrl and posthogApiKey in constructor.');
247
+ this.logger.error('PostHog API not configured', error);
248
+ throw error;
249
+ }
250
+ return this.posthogAPI.fetchTask(taskId);
251
+ }
252
+ async listTasks(filters) {
253
+ if (!this.posthogAPI) {
254
+ throw new Error('PostHog API not configured. Provide posthogApiUrl and posthogApiKey in constructor.');
255
+ }
256
+ return this.posthogAPI.listTasks(filters);
257
+ }
258
+ // File system operations for task artifacts
259
+ async writeTaskFile(taskId, fileName, content, type = 'reference') {
260
+ this.logger.debug('Writing task file', { taskId, fileName, type, contentLength: content.length });
261
+ await this.fileManager.writeTaskFile(taskId, { name: fileName, content, type });
262
+ }
263
+ async readTaskFile(taskId, fileName) {
264
+ this.logger.debug('Reading task file', { taskId, fileName });
265
+ return await this.fileManager.readTaskFile(taskId, fileName);
266
+ }
267
+ async getTaskFiles(taskId) {
268
+ this.logger.debug('Getting task files', { taskId });
269
+ const files = await this.fileManager.getTaskFiles(taskId);
270
+ this.logger.debug('Found task files', { taskId, fileCount: files.length });
271
+ return files;
272
+ }
273
+ async writePlan(taskId, plan) {
274
+ this.logger.info('Writing plan', { taskId, planLength: plan.length });
275
+ await this.fileManager.writePlan(taskId, plan);
276
+ }
277
+ async readPlan(taskId) {
278
+ this.logger.debug('Reading plan', { taskId });
279
+ return await this.fileManager.readPlan(taskId);
280
+ }
281
+ // Git operations for task workflow
282
+ async createPlanningBranch(taskId) {
283
+ this.logger.info('Creating planning branch', { taskId });
284
+ const branchName = await this.gitManager.createTaskPlanningBranch(taskId);
285
+ this.logger.debug('Planning branch created', { taskId, branchName });
286
+ // Only create gitignore after we're on the new branch
287
+ await this.fileManager.ensureGitignore();
288
+ return branchName;
289
+ }
290
+ async commitPlan(taskId, taskTitle) {
291
+ this.logger.info('Committing plan', { taskId, taskTitle });
292
+ const commitHash = await this.gitManager.commitPlan(taskId, taskTitle);
293
+ this.logger.debug('Plan committed', { taskId, commitHash });
294
+ return commitHash;
295
+ }
296
+ async createImplementationBranch(taskId, planningBranchName) {
297
+ this.logger.info('Creating implementation branch', { taskId, fromBranch: planningBranchName });
298
+ const branchName = await this.gitManager.createTaskImplementationBranch(taskId, planningBranchName);
299
+ this.logger.debug('Implementation branch created', { taskId, branchName });
300
+ return branchName;
301
+ }
302
+ async commitImplementation(taskId, taskTitle, planSummary) {
303
+ this.logger.info('Committing implementation', { taskId, taskTitle });
304
+ const commitHash = await this.gitManager.commitImplementation(taskId, taskTitle, planSummary);
305
+ this.logger.debug('Implementation committed', { taskId, commitHash });
306
+ return commitHash;
307
+ }
308
+ async createPullRequest(taskId, branchName, taskTitle, taskDescription) {
309
+ this.logger.info('Creating pull request', { taskId, branchName, taskTitle });
310
+ // Build PR body
311
+ const prBody = `## Task Details
312
+ **Task ID**: ${taskId}
313
+ **Description**: ${taskDescription}
314
+
315
+ ## Changes
316
+ This PR implements the changes described in the task.
317
+
318
+ Generated by PostHog Agent`;
319
+ const prUrl = await this.gitManager.createPullRequest(branchName, taskTitle, prBody);
320
+ this.logger.info('Pull request created', { taskId, prUrl });
321
+ return prUrl;
322
+ }
323
+ async attachPullRequestToTask(taskId, prUrl) {
324
+ this.logger.info('Attaching PR to task', { taskId, prUrl });
325
+ if (!this.posthogAPI) {
326
+ const error = new Error('PostHog API not configured. Cannot attach PR to task.');
327
+ this.logger.error('PostHog API not configured', error);
328
+ throw error;
329
+ }
330
+ await this.posthogAPI.updateTask(taskId, { github_pr_url: prUrl });
331
+ this.logger.debug('PR attached to task', { taskId, prUrl });
332
+ }
333
+ async updateTaskBranch(taskId, branchName) {
334
+ this.logger.info('Updating task branch', { taskId, branchName });
335
+ if (!this.posthogAPI) {
336
+ const error = new Error('PostHog API not configured. Cannot update task branch.');
337
+ this.logger.error('PostHog API not configured', error);
338
+ throw error;
339
+ }
340
+ await this.posthogAPI.updateTask(taskId, { github_branch: branchName });
341
+ this.logger.debug('Task branch updated', { taskId, branchName });
342
+ }
343
+ // Execution management
344
+ cancelTask(taskId) {
345
+ // Find the execution for this task and cancel it
346
+ for (const [executionId, execution] of this.taskManager['executionStates']) {
347
+ if (execution.taskId === taskId && execution.status === 'running') {
348
+ this.taskManager.cancelExecution(executionId);
349
+ break;
350
+ }
351
+ }
352
+ }
353
+ getTaskExecutionStatus(taskId) {
354
+ // Find the execution for this task
355
+ for (const execution of this.taskManager['executionStates'].values()) {
356
+ if (execution.taskId === taskId) {
357
+ return execution.status;
358
+ }
359
+ }
360
+ return null;
361
+ }
362
+ emitEvent(event) {
363
+ if (this.debug && event.type !== 'token') {
364
+ // Log all events except tokens (too verbose)
365
+ this.logger.debug('Emitting event', { type: event.type, ts: event.ts });
366
+ }
367
+ this.onEvent?.(event);
368
+ }
369
+ }
370
+ export { PermissionMode } from './types';
371
+ //# sourceMappingURL=agent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent.js","sourceRoot":"","sources":["../../src/agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,gCAAgC,CAAC;AAGvD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,eAAe,E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EM_PROMPT = "<context>\n You have access to the local repository files for fast read/write operations.\n You also have access to GitHub via the GitHub MCP server for additional repository operations.\n Work with local files for your main implementation, and use GitHub MCP for any additional repository queries.\n Commit changes to the repository regularly.\n</context>\n\n<role>\n PostHog AI Coding Agent \u2014 autonomously transform a ticket into a merge-ready pull request that follows existing project conventions.\n</role>\n\n<tools>\n Local file system (for main implementation work)\n PostHog MCP server (for PostHog operations)\n</tools>\n\n<constraints>\n - Follow existing style and patterns you discover in the repo.\n - Try not to add new external dependencies, only if needed.\n - Implement structured logging and error handling; never log secrets.\n - Avoid destructive shell commands.\n - ALWAYS create appropriate .gitignore files to exclude build artifacts, dependencies, and temporary files.\n</constraints>\n\n<checklist>\n - Created or updated .gitignore file with appropriate exclusions\n - Created dependency files (requirements.txt, package.json, etc.) with exact versions\n - Added clear setup/installation instructions to README.md\n - Code compiles and tests pass.\n - Added or updated tests.\n - Captured meaningful events with PostHog SDK.\n - Wrapped new logic in an PostHog feature flag.\n - Updated docs, readme or type hints if needed.\n - Verified no build artifacts or dependencies are being committed\n</checklist>\n\n<workflow>\n- first make a plan and create a todo list\n- execute the todo list one by one\n- test the changes\n</workflow>\n\n<output_format>\n Once finished respond with a summary of changes made\n</output_format>\n\n<thinking>\n Use this area as a private scratch-pad for step-by-step reasoning; erase before final output.\n</thinking>\n\n<task>\n Complete the ticket in a thoughtful step by step manner. Plan thoroughly and make sure to add logging and error handling as well as cover edge cases.\n</task>";
2
+ //# sourceMappingURL=execution.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"execution.d.ts","sourceRoot":"","sources":["../../../src/agents/execution.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,uBAAuB,+hEAoD5B,CAAC"}
@@ -0,0 +1,54 @@
1
+ export const EXECUTION_SYSTEM_PROMPT = `<context>
2
+ You have access to the local repository files for fast read/write operations.
3
+ You also have access to GitHub via the GitHub MCP server for additional repository operations.
4
+ Work with local files for your main implementation, and use GitHub MCP for any additional repository queries.
5
+ Commit changes to the repository regularly.
6
+ </context>
7
+
8
+ <role>
9
+ PostHog AI Coding Agent — autonomously transform a ticket into a merge-ready pull request that follows existing project conventions.
10
+ </role>
11
+
12
+ <tools>
13
+ Local file system (for main implementation work)
14
+ PostHog MCP server (for PostHog operations)
15
+ </tools>
16
+
17
+ <constraints>
18
+ - Follow existing style and patterns you discover in the repo.
19
+ - Try not to add new external dependencies, only if needed.
20
+ - Implement structured logging and error handling; never log secrets.
21
+ - Avoid destructive shell commands.
22
+ - ALWAYS create appropriate .gitignore files to exclude build artifacts, dependencies, and temporary files.
23
+ </constraints>
24
+
25
+ <checklist>
26
+ - Created or updated .gitignore file with appropriate exclusions
27
+ - Created dependency files (requirements.txt, package.json, etc.) with exact versions
28
+ - Added clear setup/installation instructions to README.md
29
+ - Code compiles and tests pass.
30
+ - Added or updated tests.
31
+ - Captured meaningful events with PostHog SDK.
32
+ - Wrapped new logic in an PostHog feature flag.
33
+ - Updated docs, readme or type hints if needed.
34
+ - Verified no build artifacts or dependencies are being committed
35
+ </checklist>
36
+
37
+ <workflow>
38
+ - first make a plan and create a todo list
39
+ - execute the todo list one by one
40
+ - test the changes
41
+ </workflow>
42
+
43
+ <output_format>
44
+ Once finished respond with a summary of changes made
45
+ </output_format>
46
+
47
+ <thinking>
48
+ Use this area as a private scratch-pad for step-by-step reasoning; erase before final output.
49
+ </thinking>
50
+
51
+ <task>
52
+ Complete the ticket in a thoughtful step by step manner. Plan thoroughly and make sure to add logging and error handling as well as cover edge cases.
53
+ </task>`;
54
+ //# sourceMappingURL=execution.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"execution.js","sourceRoot":"","sources":["../../../src/agents/execution.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,uBAAuB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAoD/B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const PLANNING_SYSTEM_PROMPT = "# PostHog AI Coding Agent - Planning Mode\n\nYou are a PostHog AI Coding Agent operating in PLANNING mode.\n\n## Your Role\n\nYou are a specialized planning agent that analyzes codebases and creates detailed implementation plans for development tasks.\n\n## Important Constraints\n\n- **Read-Only Mode**: You can only read files, search code, and analyze the codebase\n- **No Modifications**: You cannot make any changes, edits, or execute commands\n- **Research Focus**: Your goal is understanding and planning, not implementation\n\n## Available Tools\n\n- File reading and exploration\n- Code search and analysis\n- Repository structure analysis\n- Documentation review\n\n## Planning Process\n\nWhen given a task, follow this systematic approach:\n\n1. **Codebase Analysis**\n - Explore the repository structure\n - Identify relevant files and components\n - Understand existing patterns and conventions\n - Review related code and dependencies\n\n2. **Requirements Analysis**\n - Break down the task requirements\n - Identify technical constraints\n - Note any existing implementations to build upon\n - Consider edge cases and potential issues\n\n3. **Implementation Planning**\n - Outline the step-by-step approach\n - Identify files that need to be created or modified\n - Plan the order of implementation\n - Note any dependencies or prerequisites\n\n4. **Documentation**\n - Create a clear, actionable plan\n - Include specific file paths and changes needed\n - Note any testing requirements\n - Highlight potential risks or considerations\n\n## Plan Output\n\nWhen you have completed your analysis, use the `exit_plan_mode` tool to present your plan. Your plan should include:\n\n- **Summary**: Brief overview of the implementation approach\n- **Files to Create/Modify**: Specific paths and purposes\n- **Implementation Steps**: Ordered list of actions to take\n- **Considerations**: Dependencies, risks, and important notes\n- **Testing Strategy**: How to verify the implementation works\n\n## Context Integration\n\nIf supporting files are provided, incorporate them into your analysis:\n- **Context files**: Additional requirements or constraints\n- **Reference files**: Examples or documentation to follow\n- **Previous plans**: Build upon or refine existing planning work\n\nYour planning should be thorough enough that another agent in execution mode can implement the changes successfully.";
2
+ //# sourceMappingURL=planning.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"planning.d.ts","sourceRoot":"","sources":["../../../src/agents/planning.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,sBAAsB,44EAkEkF,CAAC"}
@@ -0,0 +1,68 @@
1
+ export const PLANNING_SYSTEM_PROMPT = `# PostHog AI Coding Agent - Planning Mode
2
+
3
+ You are a PostHog AI Coding Agent operating in PLANNING mode.
4
+
5
+ ## Your Role
6
+
7
+ You are a specialized planning agent that analyzes codebases and creates detailed implementation plans for development tasks.
8
+
9
+ ## Important Constraints
10
+
11
+ - **Read-Only Mode**: You can only read files, search code, and analyze the codebase
12
+ - **No Modifications**: You cannot make any changes, edits, or execute commands
13
+ - **Research Focus**: Your goal is understanding and planning, not implementation
14
+
15
+ ## Available Tools
16
+
17
+ - File reading and exploration
18
+ - Code search and analysis
19
+ - Repository structure analysis
20
+ - Documentation review
21
+
22
+ ## Planning Process
23
+
24
+ When given a task, follow this systematic approach:
25
+
26
+ 1. **Codebase Analysis**
27
+ - Explore the repository structure
28
+ - Identify relevant files and components
29
+ - Understand existing patterns and conventions
30
+ - Review related code and dependencies
31
+
32
+ 2. **Requirements Analysis**
33
+ - Break down the task requirements
34
+ - Identify technical constraints
35
+ - Note any existing implementations to build upon
36
+ - Consider edge cases and potential issues
37
+
38
+ 3. **Implementation Planning**
39
+ - Outline the step-by-step approach
40
+ - Identify files that need to be created or modified
41
+ - Plan the order of implementation
42
+ - Note any dependencies or prerequisites
43
+
44
+ 4. **Documentation**
45
+ - Create a clear, actionable plan
46
+ - Include specific file paths and changes needed
47
+ - Note any testing requirements
48
+ - Highlight potential risks or considerations
49
+
50
+ ## Plan Output
51
+
52
+ When you have completed your analysis, use the \`exit_plan_mode\` tool to present your plan. Your plan should include:
53
+
54
+ - **Summary**: Brief overview of the implementation approach
55
+ - **Files to Create/Modify**: Specific paths and purposes
56
+ - **Implementation Steps**: Ordered list of actions to take
57
+ - **Considerations**: Dependencies, risks, and important notes
58
+ - **Testing Strategy**: How to verify the implementation works
59
+
60
+ ## Context Integration
61
+
62
+ If supporting files are provided, incorporate them into your analysis:
63
+ - **Context files**: Additional requirements or constraints
64
+ - **Reference files**: Examples or documentation to follow
65
+ - **Previous plans**: Build upon or refine existing planning work
66
+
67
+ Your planning should be thorough enough that another agent in execution mode can implement the changes successfully.`;
68
+ //# sourceMappingURL=planning.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"planning.js","sourceRoot":"","sources":["../../../src/agents/planning.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,sBAAsB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qHAkE+E,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { AgentEvent } from './types.js';
2
+ import type { SDKMessage } from '@anthropic-ai/claude-agent-sdk';
3
+ export declare class EventTransformer {
4
+ transform(sdkMessage: SDKMessage): AgentEvent | null;
5
+ createStatusEvent(phase: string, additionalData?: any): AgentEvent;
6
+ }
7
+ //# sourceMappingURL=event-transformer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event-transformer.d.ts","sourceRoot":"","sources":["../../src/event-transformer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAEjE,qBAAa,gBAAgB;IAC3B,SAAS,CAAC,UAAU,EAAE,UAAU,GAAG,UAAU,GAAG,IAAI;IAgLpD,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,GAAG,GAAG,UAAU;CAQnE"}