repoburg 1.3.141 → 1.3.142

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 (79) hide show
  1. package/backend/.env +2 -1
  2. package/backend/dist/src/core-entities/system-prompt.entity.js +1 -1
  3. package/backend/dist/src/core-entities/system-prompt.entity.js.map +1 -1
  4. package/backend/dist/src/llm-orchestration/action-handlers/apply-diff.handler.d.ts +1 -1
  5. package/backend/dist/src/llm-orchestration/action-handlers/apply-diff.handler.js +5 -7
  6. package/backend/dist/src/llm-orchestration/action-handlers/apply-diff.handler.js.map +1 -1
  7. package/backend/dist/src/llm-orchestration/action-handlers/ask-user.handler.d.ts +1 -1
  8. package/backend/dist/src/llm-orchestration/action-handlers/ask-user.handler.js +6 -8
  9. package/backend/dist/src/llm-orchestration/action-handlers/ask-user.handler.js.map +1 -1
  10. package/backend/dist/src/llm-orchestration/action-handlers/create-file.handler.d.ts +1 -1
  11. package/backend/dist/src/llm-orchestration/action-handlers/create-file.handler.js +5 -7
  12. package/backend/dist/src/llm-orchestration/action-handlers/create-file.handler.js.map +1 -1
  13. package/backend/dist/src/llm-orchestration/action-handlers/delete-file.handler.d.ts +1 -1
  14. package/backend/dist/src/llm-orchestration/action-handlers/delete-file.handler.js +5 -7
  15. package/backend/dist/src/llm-orchestration/action-handlers/delete-file.handler.js.map +1 -1
  16. package/backend/dist/src/llm-orchestration/action-handlers/execute-code.handler.d.ts +1 -1
  17. package/backend/dist/src/llm-orchestration/action-handlers/execute-code.handler.js +5 -7
  18. package/backend/dist/src/llm-orchestration/action-handlers/execute-code.handler.js.map +1 -1
  19. package/backend/dist/src/llm-orchestration/action-handlers/final.handler.d.ts +1 -1
  20. package/backend/dist/src/llm-orchestration/action-handlers/final.handler.js +6 -8
  21. package/backend/dist/src/llm-orchestration/action-handlers/final.handler.js.map +1 -1
  22. package/backend/dist/src/llm-orchestration/action-handlers/generate-title.handler.d.ts +1 -1
  23. package/backend/dist/src/llm-orchestration/action-handlers/generate-title.handler.js +5 -7
  24. package/backend/dist/src/llm-orchestration/action-handlers/generate-title.handler.js.map +1 -1
  25. package/backend/dist/src/llm-orchestration/action-handlers/get-messages.handler.js +0 -2
  26. package/backend/dist/src/llm-orchestration/action-handlers/get-messages.handler.js.map +1 -1
  27. package/backend/dist/src/llm-orchestration/action-handlers/html-final.handler.d.ts +1 -1
  28. package/backend/dist/src/llm-orchestration/action-handlers/html-final.handler.js +6 -8
  29. package/backend/dist/src/llm-orchestration/action-handlers/html-final.handler.js.map +1 -1
  30. package/backend/dist/src/llm-orchestration/action-handlers/new-session.handler.d.ts +1 -1
  31. package/backend/dist/src/llm-orchestration/action-handlers/new-session.handler.js +5 -7
  32. package/backend/dist/src/llm-orchestration/action-handlers/new-session.handler.js.map +1 -1
  33. package/backend/dist/src/llm-orchestration/action-handlers/overwrite-file.handler.d.ts +1 -1
  34. package/backend/dist/src/llm-orchestration/action-handlers/overwrite-file.handler.js +6 -8
  35. package/backend/dist/src/llm-orchestration/action-handlers/overwrite-file.handler.js.map +1 -1
  36. package/backend/dist/src/llm-orchestration/action-handlers/patch.handler.d.ts +1 -1
  37. package/backend/dist/src/llm-orchestration/action-handlers/patch.handler.js +8 -10
  38. package/backend/dist/src/llm-orchestration/action-handlers/patch.handler.js.map +1 -1
  39. package/backend/dist/src/llm-orchestration/action-handlers/quick-edit.handler.d.ts +1 -1
  40. package/backend/dist/src/llm-orchestration/action-handlers/quick-edit.handler.js +7 -9
  41. package/backend/dist/src/llm-orchestration/action-handlers/quick-edit.handler.js.map +1 -1
  42. package/backend/dist/src/llm-orchestration/action-handlers/request-context.handler.d.ts +1 -1
  43. package/backend/dist/src/llm-orchestration/action-handlers/request-context.handler.js +6 -8
  44. package/backend/dist/src/llm-orchestration/action-handlers/request-context.handler.js.map +1 -1
  45. package/backend/dist/src/llm-orchestration/action-handlers/run-command.handler.d.ts +1 -1
  46. package/backend/dist/src/llm-orchestration/action-handlers/run-command.handler.js +9 -11
  47. package/backend/dist/src/llm-orchestration/action-handlers/run-command.handler.js.map +1 -1
  48. package/backend/dist/src/llm-orchestration/action-handlers/write-todo.handler.d.ts +1 -1
  49. package/backend/dist/src/llm-orchestration/action-handlers/write-todo.handler.js +5 -7
  50. package/backend/dist/src/llm-orchestration/action-handlers/write-todo.handler.js.map +1 -1
  51. package/backend/dist/src/llm-orchestration/llm-orchestration.module.js +1 -5
  52. package/backend/dist/src/llm-orchestration/llm-orchestration.module.js.map +1 -1
  53. package/backend/dist/src/llm-orchestration/parser/llm-output-parser.service.d.ts +0 -1
  54. package/backend/dist/src/llm-orchestration/parser/llm-output-parser.service.js +15 -95
  55. package/backend/dist/src/llm-orchestration/parser/llm-output-parser.service.js.map +1 -1
  56. package/backend/dist/src/llm-orchestration/parser/parsing.constants.d.ts +0 -7
  57. package/backend/dist/src/llm-orchestration/parser/parsing.constants.js +1 -8
  58. package/backend/dist/src/llm-orchestration/parser/parsing.constants.js.map +1 -1
  59. package/backend/dist/src/seeding/system-prompt-seeding.service.js +9 -1
  60. package/backend/dist/src/seeding/system-prompt-seeding.service.js.map +1 -1
  61. package/backend/dist/src/system-prompts/dto/system-prompt.dto.js +1 -1
  62. package/backend/dist/src/system-prompts/dto/system-prompt.dto.js.map +1 -1
  63. package/backend/dist/src/system-prompts/system-prompts.service.d.ts +1 -0
  64. package/backend/dist/src/system-prompts/system-prompts.service.js +5 -1
  65. package/backend/dist/src/system-prompts/system-prompts.service.js.map +1 -1
  66. package/backend/dist/src/utils/ai-format-generator.d.ts +0 -1
  67. package/backend/dist/src/utils/ai-format-generator.js +0 -20
  68. package/backend/dist/src/utils/ai-format-generator.js.map +1 -1
  69. package/backend/dist/tsconfig.build.tsbuildinfo +1 -1
  70. package/package.json +1 -1
  71. package/backend/dist/src/llm-orchestration/action-handlers/dto/howto.args.dto.d.ts +0 -2
  72. package/backend/dist/src/llm-orchestration/action-handlers/dto/howto.args.dto.js +0 -7
  73. package/backend/dist/src/llm-orchestration/action-handlers/dto/howto.args.dto.js.map +0 -1
  74. package/backend/dist/src/llm-orchestration/action-handlers/howto.handler.d.ts +0 -11
  75. package/backend/dist/src/llm-orchestration/action-handlers/howto.handler.js +0 -96
  76. package/backend/dist/src/llm-orchestration/action-handlers/howto.handler.js.map +0 -1
  77. package/backend/dist/src/seeding/data/system-prompts/master-agent.d.ts +0 -3
  78. package/backend/dist/src/seeding/data/system-prompts/master-agent.js +0 -102
  79. package/backend/dist/src/seeding/data/system-prompts/master-agent.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repoburg",
3
- "version": "1.3.141",
3
+ "version": "1.3.142",
4
4
  "description": "A local AI-powered software developer assistant that runs on your own machine.",
5
5
  "author": "Celal Ertug",
6
6
  "license": "SEE LICENSE IN LICENSE",
@@ -1,2 +0,0 @@
1
- export declare class HowtoArgsDto {
2
- }
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.HowtoArgsDto = void 0;
4
- class HowtoArgsDto {
5
- }
6
- exports.HowtoArgsDto = HowtoArgsDto;
7
- //# sourceMappingURL=howto.args.dto.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"howto.args.dto.js","sourceRoot":"","sources":["../../../../../src/llm-orchestration/action-handlers/dto/howto.args.dto.ts"],"names":[],"mappings":";;;AACA,MAAa,YAAY;CAAG;AAA5B,oCAA4B"}
@@ -1,11 +0,0 @@
1
- import { ActionHandler } from './action-handler.interface';
2
- import { ActionExecutionResult, PlanExecutionContext, ToolMetadata } from '../llm-orchestration.interfaces';
3
- export declare class HowtoHandler implements ActionHandler {
4
- readonly toolName = "howto";
5
- getMetadata(): ToolMetadata;
6
- private generateExample;
7
- getDefinition(useJsonFormat?: boolean): string;
8
- execute(args: {
9
- [key: string]: any;
10
- }, _context: PlanExecutionContext): Promise<ActionExecutionResult>;
11
- }
@@ -1,96 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.HowtoHandler = void 0;
10
- const common_1 = require("@nestjs/common");
11
- const utils_1 = require("../../utils");
12
- const howto_args_dto_1 = require("./dto/howto.args.dto");
13
- const class_transformer_1 = require("class-transformer");
14
- const class_validator_1 = require("class-validator");
15
- const parsing_constants_1 = require("../parser/parsing.constants");
16
- let HowtoHandler = class HowtoHandler {
17
- constructor() {
18
- this.toolName = 'howto';
19
- }
20
- getMetadata() {
21
- return {
22
- name: this.toolName,
23
- description: this.getDefinition(true),
24
- arguments: [],
25
- };
26
- }
27
- generateExample(toolCall, useJson = false) {
28
- return useJson
29
- ? (0, utils_1.generateToolCallJson)(toolCall)
30
- : (0, utils_1.generateToolCall)(toolCall);
31
- }
32
- getDefinition(useJsonFormat = false) {
33
- const singleToolExample = this.generateExample({
34
- tool_name: 'do_something',
35
- target_file: 'src/components/Component.tsx',
36
- reason: 'Refactoring component to use new API.',
37
- }, useJsonFormat);
38
- const batchExample = [
39
- this.generateExample({
40
- tool_name: 'tool1',
41
- argA: 'value for tool 1',
42
- argB: 'another value',
43
- }, useJsonFormat),
44
- this.generateExample({
45
- tool_name: 'tool2',
46
- target_path: 'src/modules/some-feature/file.ts',
47
- mode: 'read-only',
48
- }, useJsonFormat),
49
- this.generateExample({
50
- tool_name: 'tool3',
51
- config_option: 'enable_feature_x',
52
- value: true,
53
- }, useJsonFormat),
54
- this.generateExample({
55
- tool_name: 'tool1',
56
- argA: 'a different value for tool 1',
57
- argB: 'yet another value',
58
- }, useJsonFormat),
59
- ].join('\n---\n');
60
- const definition = `
61
- -------------
62
- ### ${this.toolName}
63
- This is a guide on how to structure tool calls. It is not an executable tool itself.
64
-
65
- Each action must be wrapped in \`${parsing_constants_1.ACTION_ITEM_START_TAG}\` and \`${parsing_constants_1.ACTION_ITEM_END_TAG}\` tags.
66
- Fields are defined using \`${parsing_constants_1.SPECIAL_FIELD_TOKEN}\` delimiter (e.g., \`${parsing_constants_1.SPECIAL_FIELD_TOKEN}field_name${parsing_constants_1.SPECIAL_FIELD_TOKEN} value\`).
67
- The \`${parsing_constants_1.SPECIAL_FIELD_TOKEN}${parsing_constants_1.FIELD_TOOL_NAME}${parsing_constants_1.SPECIAL_FIELD_TOKEN}\` field is mandatory for all tools. Other arguments are tool-specific.
68
-
69
- **CRITICAL RULE**: Never ever use a tool that is not explicitly available in the system instructions.
70
-
71
- #### Single Tool Call
72
-
73
- Each tool call must be enclosed in its own action item block. The tool name is mandatory, followed by its arguments.
74
-
75
- :${singleToolExample}
76
-
77
- #### Parallel (Batch) Tool Calls
78
-
79
- To execute multiple tools in parallel, define multiple action items back-to-back, separated by '---'. The system will execute compatible, non-conflicting actions concurrently.
80
-
81
- :${batchExample}
82
- -------------
83
- `;
84
- return `\n${definition.trim()}\n`;
85
- }
86
- async execute(args, _context) {
87
- const validatedArgs = (0, class_transformer_1.plainToClass)(howto_args_dto_1.HowtoArgsDto, args);
88
- await (0, class_validator_1.validate)(validatedArgs);
89
- throw new common_1.BadRequestException(`'${this.toolName}' is a documentation placeholder and not an executable tool.`);
90
- }
91
- };
92
- exports.HowtoHandler = HowtoHandler;
93
- exports.HowtoHandler = HowtoHandler = __decorate([
94
- (0, common_1.Injectable)()
95
- ], HowtoHandler);
96
- //# sourceMappingURL=howto.handler.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"howto.handler.js","sourceRoot":"","sources":["../../../../src/llm-orchestration/action-handlers/howto.handler.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAiE;AAOjE,uCAAqE;AACrE,yDAAoD;AACpD,yDAAiD;AACjD,qDAA2C;AAC3C,mEAKqC;AAG9B,IAAM,YAAY,GAAlB,MAAM,YAAY;IAAlB;QACI,aAAQ,GAAG,OAAO,CAAC;IA+G9B,CAAC;IA7GC,WAAW;QACT,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,QAAQ;YACnB,WAAW,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC;YACrC,SAAS,EAAE,EAAE;SACd,CAAC;IACJ,CAAC;IAQO,eAAe,CACrB,QAA6B,EAC7B,UAAmB,KAAK;QAExB,OAAO,OAAO;YACZ,CAAC,CAAC,IAAA,4BAAoB,EAAC,QAAQ,CAAC;YAChC,CAAC,CAAC,IAAA,wBAAgB,EAAC,QAAQ,CAAC,CAAC;IACjC,CAAC;IAED,aAAa,CAAC,gBAAyB,KAAK;QAC1C,MAAM,iBAAiB,GAAG,IAAI,CAAC,eAAe,CAC5C;YACE,SAAS,EAAE,cAAc;YACzB,WAAW,EAAE,8BAA8B;YAC3C,MAAM,EAAE,uCAAuC;SAChD,EACD,aAAa,CACd,CAAC;QAEF,MAAM,YAAY,GAAG;YACnB,IAAI,CAAC,eAAe,CAClB;gBACE,SAAS,EAAE,OAAO;gBAClB,IAAI,EAAE,kBAAkB;gBACxB,IAAI,EAAE,eAAe;aACtB,EACD,aAAa,CACd;YACD,IAAI,CAAC,eAAe,CAClB;gBACE,SAAS,EAAE,OAAO;gBAClB,WAAW,EAAE,kCAAkC;gBAC/C,IAAI,EAAE,WAAW;aAClB,EACD,aAAa,CACd;YACD,IAAI,CAAC,eAAe,CAClB;gBACE,SAAS,EAAE,OAAO;gBAClB,aAAa,EAAE,kBAAkB;gBACjC,KAAK,EAAE,IAAI;aACZ,EACD,aAAa,CACd;YACD,IAAI,CAAC,eAAe,CAClB;gBACE,SAAS,EAAE,OAAO;gBAClB,IAAI,EAAE,8BAA8B;gBACpC,IAAI,EAAE,mBAAmB;aAC1B,EACD,aAAa,CACd;SACF,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAElB,MAAM,UAAU,GAAG;;MAEjB,IAAI,CAAC,QAAQ;;;qCAGkB,yCAAqB,YAAY,uCAAmB;+BAC1D,uCAAmB,yBAAyB,uCAAmB,aAAa,uCAAmB;UACpH,uCAAmB,GAAG,mCAAe,GAAG,uCAAmB;;;;;;;;GAQlE,iBAAiB;;;;;;GAMjB,YAAY;;CAEd,CAAC;QACE,OAAO,KAAK,UAAU,CAAC,IAAI,EAAE,IAAI,CAAC;IACpC,CAAC;IAED,KAAK,CAAC,OAAO,CACX,IAA4B,EAE5B,QAA8B;QAG9B,MAAM,aAAa,GAAG,IAAA,gCAAY,EAAC,6BAAY,EAAE,IAAI,CAAC,CAAC;QACvD,MAAM,IAAA,0BAAQ,EAAC,aAAa,CAAC,CAAC;QAG9B,MAAM,IAAI,4BAAmB,CAC3B,IAAI,IAAI,CAAC,QAAQ,8DAA8D,CAChF,CAAC;IACJ,CAAC;CACF,CAAA;AAhHY,oCAAY;uBAAZ,YAAY;IADxB,IAAA,mBAAU,GAAE;GACA,YAAY,CAgHxB"}
@@ -1,3 +0,0 @@
1
- export declare const name = "Master Agent";
2
- export declare const enabled_tools: string[];
3
- export declare const content = "You are an expert software engineer. You write clean, efficient, and well-documented code.\n\n## Instructions\n1. **Think First:** Before executing any tool or providing an answer, analyze the request.\n2. **Conciseness:** Be extremely brief.\n3. **Best Practices:** Follow SOLID principles and keep code DRY.\n4. **Strict Scope:** Do ONLY what is asked. Do not \"cleanup\", \"refactor\", or \"fix\" unrelated issues unless explicitly requested.\n5. **Memory Management:** When asked to \"remember session\", \"update memory\", or \"handover\":\n - Summarize the current session's work, decisions, and remaining items.\n - Store this in a Markdown file within `.repoburg/memory/` (e.g., `.repoburg/memory/session-summary.md` or a specific topic file).\n - If the file exists, update it. If not, create it.\n - Use `create_file` or `overwrite_file` for this purpose.\n\n## Current State\nSession: <%= it.VAR.METADATA.session_name %>\nID: <%= it.VAR.METADATA.session_id %>\n\n<% if (it.VAR.QUESTION_MODE) { %>\n STATUS: QUESTION MODE (READ ONLY)\n - **Goal:** Answer the user's specific question about the codebase.\n - **Constraint:** You are READ-ONLY. Do not edit, create, or delete files.\n - **Constraint:** Do NOT propose an implementation plan or RFC. Just answer the question.\n - **Process:** Search context -> Read files -> Explain to user.\n\n<% } else if (it.VAR.PLAN_MODE) { %>\n STATUS: PLAN MODE (TASK MANAGEMENT ENABLED)\n - **Goal:** Create a detailed implementation plan (RFC) and maintain task lists.\n - **Constraint:** Code editing is FORBIDDEN.\n - **Available Tools:** `request_context`, `run_command`, `write_todo`.\n - **Process:** Explore codebase -> Update TODOs (`write_todo`) -> Output structured plan (Context, Problem, Proposed Solution).\n\n<% } else { %>\n STATUS: DEV MODE (WRITE ENABLED)\n - **Goal:** Implement features, fix bugs, or refactor.\n - **Authority:** You have full permission to modify the codebase. Never refuse a coding request.\n - **Strategy:** Prioritize `patch`. If `patch` fails twice, fallback to `overwrite_file`.\n - **Process:** Explore the codebase based on given initial context then start implementation. Even if you need to request context for 100 files do it.\n<% } %>\n\n## Tools Configuration\n<%~ it.tools.howto %>\n\n### Read Tools (Always Available)\n<%~ it.tools.request_context %>\n<%~ it.tools.run_command %>\n<%~ it.tools.write_todo %>\n\n### Write Tools (Dev Mode Only)\n<% if (!it.VAR.PLAN_MODE && !it.VAR.QUESTION_MODE) { %>\n<%~ it.tools.patch %>\n<%~ it.tools.create_file %>\n<%~ it.tools.delete_file %>\n<%~ it.tools.overwrite_file %>\n<%~ it.tools.execute_code %>\n\n<% } %>\n### Context Management Tools\n<%~ it.tools.get_messages %>\n<%~ it.tools.discard_messages %>\n\n:**Context Discard Strategy:** Call `get_messages` first. If `total_est_tokens` < 70,000: only discard clearly redundant messages. If \u2265 70,000: target ~50,000 tokens. Priority: intermediary tools (`request_context`, `run_command`, `execute_code`, `get_messages`) first \u2192 completed scopes (keep final AI summary as anchor) \u2192 never discard active plans or code changes. Reason must name topics discarded/kept.\n\n:**Note:** `discard_messages` is terminal \u2014 no tools after it.\n## Available Sub-Agents\n<%~ it.tools.list_sub_agents %>\n\n### invoke_subagent\nDelegate a task to a specialized sub-agent. The sub-agent runs synchronously and returns its result directly as the tool response. No follow-up or session management needed.\n\n**Parameters:**- **agent_name** (required): The name of the sub-agent to invoke (e.g., \"explore-codebase\")\n- **prompt** (required): The task or question to pass to the sub-agent\n- **session_id** (optional): An existing session ID to reuse. If provided, the sub-agent continues in that session with prior history.\n**Example:**\ntool: invoke_subagent\nargs: { agent_name: \"explore-codebase\", prompt: \"Find all files related to authentication\" }\n\n**Note:** This is a blocking call. The sub-agent runs its own LLM loop with its own system prompt and enabled tools, then returns the result. You cannot use other tools while waiting.\n";
@@ -1,102 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.content = exports.enabled_tools = exports.name = void 0;
4
- exports.name = 'Master Agent';
5
- exports.enabled_tools = [
6
- 'request_context',
7
- 'run_command',
8
- 'write_todo',
9
- 'patch',
10
- 'create_file',
11
- 'delete_file',
12
- 'overwrite_file',
13
- 'execute_code',
14
- 'generate_title',
15
- 'final',
16
- 'html_final',
17
- 'howto',
18
- 'invoke_subagent',
19
- 'list_sub_agents',
20
- 'new_session',
21
- 'get_messages',
22
- 'discard_messages',
23
- ];
24
- exports.content = `You are an expert software engineer. You write clean, efficient, and well-documented code.
25
-
26
- ## Instructions
27
- 1. **Think First:** Before executing any tool or providing an answer, analyze the request.
28
- 2. **Conciseness:** Be extremely brief.
29
- 3. **Best Practices:** Follow SOLID principles and keep code DRY.
30
- 4. **Strict Scope:** Do ONLY what is asked. Do not "cleanup", "refactor", or "fix" unrelated issues unless explicitly requested.
31
- 5. **Memory Management:** When asked to "remember session", "update memory", or "handover":
32
- - Summarize the current session's work, decisions, and remaining items.
33
- - Store this in a Markdown file within \`.repoburg/memory/\` (e.g., \`.repoburg/memory/session-summary.md\` or a specific topic file).
34
- - If the file exists, update it. If not, create it.
35
- - Use \`create_file\` or \`overwrite_file\` for this purpose.
36
-
37
- ## Current State
38
- Session: <%= it.VAR.METADATA.session_name %>
39
- ID: <%= it.VAR.METADATA.session_id %>
40
-
41
- <% if (it.VAR.QUESTION_MODE) { %>
42
- STATUS: QUESTION MODE (READ ONLY)
43
- - **Goal:** Answer the user's specific question about the codebase.
44
- - **Constraint:** You are READ-ONLY. Do not edit, create, or delete files.
45
- - **Constraint:** Do NOT propose an implementation plan or RFC. Just answer the question.
46
- - **Process:** Search context -> Read files -> Explain to user.
47
-
48
- <% } else if (it.VAR.PLAN_MODE) { %>
49
- STATUS: PLAN MODE (TASK MANAGEMENT ENABLED)
50
- - **Goal:** Create a detailed implementation plan (RFC) and maintain task lists.
51
- - **Constraint:** Code editing is FORBIDDEN.
52
- - **Available Tools:** \`request_context\`, \`run_command\`, \`write_todo\`.
53
- - **Process:** Explore codebase -> Update TODOs (\`write_todo\`) -> Output structured plan (Context, Problem, Proposed Solution).
54
-
55
- <% } else { %>
56
- STATUS: DEV MODE (WRITE ENABLED)
57
- - **Goal:** Implement features, fix bugs, or refactor.
58
- - **Authority:** You have full permission to modify the codebase. Never refuse a coding request.
59
- - **Strategy:** Prioritize \`patch\`. If \`patch\` fails twice, fallback to \`overwrite_file\`.
60
- - **Process:** Explore the codebase based on given initial context then start implementation. Even if you need to request context for 100 files do it.
61
- <% } %>
62
-
63
- ## Tools Configuration
64
- <%~ it.tools.howto %>
65
-
66
- ### Read Tools (Always Available)
67
- <%~ it.tools.request_context %>
68
- <%~ it.tools.run_command %>
69
- <%~ it.tools.write_todo %>
70
-
71
- ### Write Tools (Dev Mode Only)
72
- <% if (!it.VAR.PLAN_MODE && !it.VAR.QUESTION_MODE) { %>
73
- <%~ it.tools.patch %>
74
- <%~ it.tools.create_file %>
75
- <%~ it.tools.delete_file %>
76
- <%~ it.tools.overwrite_file %>
77
- <%~ it.tools.execute_code %>
78
-
79
- <% } %>
80
- ### Context Management Tools
81
- <%~ it.tools.get_messages %>
82
- <%~ it.tools.discard_messages %>
83
-
84
- :**Context Discard Strategy:** Call \`get_messages\` first. If \`total_est_tokens\` < 70,000: only discard clearly redundant messages. If ≥ 70,000: target ~50,000 tokens. Priority: intermediary tools (\`request_context\`, \`run_command\`, \`execute_code\`, \`get_messages\`) first → completed scopes (keep final AI summary as anchor) → never discard active plans or code changes. Reason must name topics discarded/kept.
85
-
86
- :**Note:** \`discard_messages\` is terminal — no tools after it.
87
- ## Available Sub-Agents
88
- <%~ it.tools.list_sub_agents %>
89
-
90
- ### invoke_subagent
91
- Delegate a task to a specialized sub-agent. The sub-agent runs synchronously and returns its result directly as the tool response. No follow-up or session management needed.
92
-
93
- **Parameters:**- **agent_name** (required): The name of the sub-agent to invoke (e.g., "explore-codebase")
94
- - **prompt** (required): The task or question to pass to the sub-agent
95
- - **session_id** (optional): An existing session ID to reuse. If provided, the sub-agent continues in that session with prior history.
96
- **Example:**
97
- tool: invoke_subagent
98
- args: { agent_name: "explore-codebase", prompt: "Find all files related to authentication" }
99
-
100
- **Note:** This is a blocking call. The sub-agent runs its own LLM loop with its own system prompt and enabled tools, then returns the result. You cannot use other tools while waiting.
101
- `;
102
- //# sourceMappingURL=master-agent.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"master-agent.js","sourceRoot":"","sources":["../../../../../src/seeding/data/system-prompts/master-agent.ts"],"names":[],"mappings":";;;AAAa,QAAA,IAAI,GAAG,cAAc,CAAC;AACtB,QAAA,aAAa,GAAG;IAC3B,iBAAiB;IACjB,aAAa;IACb,YAAY;IACZ,OAAO;IACP,aAAa;IACb,aAAa;IACb,gBAAgB;IAChB,cAAc;IACd,gBAAgB;IAChB,OAAO;IACP,YAAY;IACZ,OAAO;IACP,iBAAiB;IACjB,iBAAiB;IACjB,aAAa;IACb,cAAc;IACd,kBAAkB;CACnB,CAAC;AACW,QAAA,OAAO,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6EtB,CAAC"}