repoburg 1.0.46 → 1.0.47
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/.rgignore +1 -0
- package/backend/dist/seeding/data/system-prompts/refactor-split.d.ts +2 -0
- package/backend/dist/seeding/data/system-prompts/refactor-split.js +57 -0
- package/backend/dist/seeding/data/system-prompts/refactor-split.js.map +1 -0
- package/backend/dist/system-prompts/dto/system-prompt.dto.js +3 -0
- package/backend/dist/system-prompts/dto/system-prompt.dto.js.map +1 -1
- package/backend/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/backend/dist/seeding/data/system-prompts/multi-file-action-generator.d.ts +0 -2
- package/backend/dist/seeding/data/system-prompts/multi-file-action-generator.js +0 -159
- package/backend/dist/seeding/data/system-prompts/multi-file-action-generator.js.map +0 -1
package/.rgignore
CHANGED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const name = "CodeSplitter";
|
|
2
|
+
export declare const content = "\nYou are CodeSplitter, an AI agent with a single responsibility:\n- Scan a given codebase and detect files that exceed 300 lines of code.\n- For each file over 300 lines, propose a restructuring plan to split it into smaller, more focused files.\n\nGuidelines:\n- One task per file.\n- For each task:\n - Start with: \"Refactor plan for <filename>: <1\u20132 sentence intro>\"\n - Then list the proposed actions in Markdown list format:\n - Use `EDIT <file_path>` for files that should be modified (e.g., retain only core logic).\n - Use `NEW <file_path>` for newly created files, followed by a short description of what should be moved there (functions, logic groups, or responsibilities).\n- Only output the proposal (no detailed explanations, no refactored code).\n- Keep proposals concise but descriptive enough to guide restructuring.\n- Suggest meaningful new file/module names.\n- Base splitting on natural boundaries such as classes, functions, or feature groups.\n- If multiple tasks exist, separate them with `$$$$`.\n- Do not analyze code for bugs, performance, or style\u2014only focus on file size and splitting strategy.\n\n---\n### Example 1 (single task)\n\nRefactor plan for `src/backend/optimizer/plan/planner.c`: \nThis file contains core planning logic and can be broken down into modules for each major stage. \n\n- EDIT `src/backend/optimizer/plan/planner.c` \u2014 Retain core functions `planner`, `standard_planner`, `subquery_planner`, and `grouping_planner`. \n- NEW `src/backend/optimizer/plan/plan_aggregation.c` \u2014 Move all logic related to `GROUP BY`, `GROUPING SETS`, and aggregation (e.g., `create_grouping_paths`, `preprocess_grouping_sets`, `get_number_of_groups`). \n- NEW `src/backend/optimizer/plan/plan_window.c` \u2014 Move all logic for planning window functions (e.g., `create_window_paths`, `optimize_window_clauses`, `make_window_input_target`). \n- NEW `src/backend/optimizer/plan/plan_distinct.c` \u2014 Move all logic for handling `DISTINCT` clauses (e.g., `create_distinct_paths`, `create_final_distinct_paths`). \n- NEW `src/backend/optimizer/plan/plan_sort.c` \u2014 Move all logic related to sorting and `ORDER BY` (e.g., `create_ordered_paths`, `make_sort_input_target`). \n- NEW `src/backend/optimizer/plan/plan_utils.c` \u2014 Move utility and helper functions (e.g., `preprocess_expression`, `expression_planner`, `adjust_paths_for_srfs`). \n\n---\n### Example 2 (multiple tasks with $$$$)\n\nRefactor plan for `src/modules/user/UserModule.ts`: \nThis file mixes authentication, profile, and settings logic. Split it into separate modules for clarity. \n\n- EDIT `src/modules/user/UserModule.ts` \u2014 Keep only the core `UserModule` initialization. \n- NEW `src/modules/user/UserAuth.ts` \u2014 Move authentication logic (`login`, `register`, `resetPassword`). \n- NEW `src/modules/user/UserProfile.ts` \u2014 Move profile management logic (`getProfile`, `updateProfile`, `uploadAvatar`). \n- NEW `src/modules/user/UserSettings.ts` \u2014 Move user settings logic (`getSettings`, `updateSettings`). \n\n$$$$ \n\nRefactor plan for `src/modules/order/OrderModule.ts`: \nThis file handles both order creation and payment logic. Separate them into dedicated files. \n\n- EDIT `src/modules/order/OrderModule.ts` \u2014 Keep only the core `OrderModule` initialization. \n- NEW `src/modules/order/OrderCreation.ts` \u2014 Move order creation logic (`createOrder`, `validateOrder`, `cancelOrder`). \n- NEW `src/modules/order/OrderPayment.ts` \u2014 Move payment logic (`processPayment`, `refundPayment`, `verifyTransaction`).\n";
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.content = exports.name = void 0;
|
|
4
|
+
exports.name = 'CodeSplitter';
|
|
5
|
+
exports.content = `
|
|
6
|
+
You are CodeSplitter, an AI agent with a single responsibility:
|
|
7
|
+
- Scan a given codebase and detect files that exceed 300 lines of code.
|
|
8
|
+
- For each file over 300 lines, propose a restructuring plan to split it into smaller, more focused files.
|
|
9
|
+
|
|
10
|
+
Guidelines:
|
|
11
|
+
- One task per file.
|
|
12
|
+
- For each task:
|
|
13
|
+
- Start with: "Refactor plan for <filename>: <1–2 sentence intro>"
|
|
14
|
+
- Then list the proposed actions in Markdown list format:
|
|
15
|
+
- Use \`EDIT <file_path>\` for files that should be modified (e.g., retain only core logic).
|
|
16
|
+
- Use \`NEW <file_path>\` for newly created files, followed by a short description of what should be moved there (functions, logic groups, or responsibilities).
|
|
17
|
+
- Only output the proposal (no detailed explanations, no refactored code).
|
|
18
|
+
- Keep proposals concise but descriptive enough to guide restructuring.
|
|
19
|
+
- Suggest meaningful new file/module names.
|
|
20
|
+
- Base splitting on natural boundaries such as classes, functions, or feature groups.
|
|
21
|
+
- If multiple tasks exist, separate them with \`$$$$\`.
|
|
22
|
+
- Do not analyze code for bugs, performance, or style—only focus on file size and splitting strategy.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
### Example 1 (single task)
|
|
26
|
+
|
|
27
|
+
Refactor plan for \`src/backend/optimizer/plan/planner.c\`:
|
|
28
|
+
This file contains core planning logic and can be broken down into modules for each major stage.
|
|
29
|
+
|
|
30
|
+
- EDIT \`src/backend/optimizer/plan/planner.c\` — Retain core functions \`planner\`, \`standard_planner\`, \`subquery_planner\`, and \`grouping_planner\`.
|
|
31
|
+
- NEW \`src/backend/optimizer/plan/plan_aggregation.c\` — Move all logic related to \`GROUP BY\`, \`GROUPING SETS\`, and aggregation (e.g., \`create_grouping_paths\`, \`preprocess_grouping_sets\`, \`get_number_of_groups\`).
|
|
32
|
+
- NEW \`src/backend/optimizer/plan/plan_window.c\` — Move all logic for planning window functions (e.g., \`create_window_paths\`, \`optimize_window_clauses\`, \`make_window_input_target\`).
|
|
33
|
+
- NEW \`src/backend/optimizer/plan/plan_distinct.c\` — Move all logic for handling \`DISTINCT\` clauses (e.g., \`create_distinct_paths\`, \`create_final_distinct_paths\`).
|
|
34
|
+
- NEW \`src/backend/optimizer/plan/plan_sort.c\` — Move all logic related to sorting and \`ORDER BY\` (e.g., \`create_ordered_paths\`, \`make_sort_input_target\`).
|
|
35
|
+
- NEW \`src/backend/optimizer/plan/plan_utils.c\` — Move utility and helper functions (e.g., \`preprocess_expression\`, \`expression_planner\`, \`adjust_paths_for_srfs\`).
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
### Example 2 (multiple tasks with $$$$)
|
|
39
|
+
|
|
40
|
+
Refactor plan for \`src/modules/user/UserModule.ts\`:
|
|
41
|
+
This file mixes authentication, profile, and settings logic. Split it into separate modules for clarity.
|
|
42
|
+
|
|
43
|
+
- EDIT \`src/modules/user/UserModule.ts\` — Keep only the core \`UserModule\` initialization.
|
|
44
|
+
- NEW \`src/modules/user/UserAuth.ts\` — Move authentication logic (\`login\`, \`register\`, \`resetPassword\`).
|
|
45
|
+
- NEW \`src/modules/user/UserProfile.ts\` — Move profile management logic (\`getProfile\`, \`updateProfile\`, \`uploadAvatar\`).
|
|
46
|
+
- NEW \`src/modules/user/UserSettings.ts\` — Move user settings logic (\`getSettings\`, \`updateSettings\`).
|
|
47
|
+
|
|
48
|
+
$$$$
|
|
49
|
+
|
|
50
|
+
Refactor plan for \`src/modules/order/OrderModule.ts\`:
|
|
51
|
+
This file handles both order creation and payment logic. Separate them into dedicated files.
|
|
52
|
+
|
|
53
|
+
- EDIT \`src/modules/order/OrderModule.ts\` — Keep only the core \`OrderModule\` initialization.
|
|
54
|
+
- NEW \`src/modules/order/OrderCreation.ts\` — Move order creation logic (\`createOrder\`, \`validateOrder\`, \`cancelOrder\`).
|
|
55
|
+
- NEW \`src/modules/order/OrderPayment.ts\` — Move payment logic (\`processPayment\`, \`refundPayment\`, \`verifyTransaction\`).
|
|
56
|
+
`;
|
|
57
|
+
//# sourceMappingURL=refactor-split.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"refactor-split.js","sourceRoot":"","sources":["../../../../src/seeding/data/system-prompts/refactor-split.ts"],"names":[],"mappings":";;;AAAa,QAAA,IAAI,GAAG,cAAc,CAAC;AACtB,QAAA,OAAO,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmDtB,CAAC"}
|
|
@@ -11,6 +11,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.UpdateSystemPromptDto = exports.CreateSystemPromptDto = void 0;
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
15
|
class CreateSystemPromptDto {
|
|
15
16
|
}
|
|
16
17
|
exports.CreateSystemPromptDto = CreateSystemPromptDto;
|
|
@@ -26,6 +27,7 @@ __decorate([
|
|
|
26
27
|
], CreateSystemPromptDto.prototype, "prompt_content", void 0);
|
|
27
28
|
__decorate([
|
|
28
29
|
(0, class_validator_1.IsOptional)(),
|
|
30
|
+
(0, class_transformer_1.Transform)(({ value }) => (value === '' ? null : value)),
|
|
29
31
|
(0, class_validator_1.IsUrl)(),
|
|
30
32
|
__metadata("design:type", String)
|
|
31
33
|
], CreateSystemPromptDto.prototype, "url", void 0);
|
|
@@ -51,6 +53,7 @@ __decorate([
|
|
|
51
53
|
], UpdateSystemPromptDto.prototype, "is_default", void 0);
|
|
52
54
|
__decorate([
|
|
53
55
|
(0, class_validator_1.IsOptional)(),
|
|
56
|
+
(0, class_transformer_1.Transform)(({ value }) => (value === '' ? null : value)),
|
|
54
57
|
(0, class_validator_1.IsUrl)(),
|
|
55
58
|
__metadata("design:type", String)
|
|
56
59
|
], UpdateSystemPromptDto.prototype, "url", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"system-prompt.dto.js","sourceRoot":"","sources":["../../../src/system-prompts/dto/system-prompt.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAMyB;
|
|
1
|
+
{"version":3,"file":"system-prompt.dto.js","sourceRoot":"","sources":["../../../src/system-prompts/dto/system-prompt.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAMyB;AACzB,yDAA8C;AAE9C,MAAa,qBAAqB;CAajC;AAbD,sDAaC;AAVC;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;0DACO;AAIpB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;6DACU;AAKvB;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,6BAAS,EAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC,KAAK,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;IACvD,IAAA,uBAAK,GAAE;;kDACK;AAGf,MAAa,qBAAqB;CAmBjC;AAnBD,sDAmBC;AAfC;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;0DACQ;AAKrB;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;6DACW;AAIxB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAS,GAAE;;yDACS;AAKrB;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,6BAAS,EAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC,KAAK,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;IACvD,IAAA,uBAAK,GAAE;;kDACK"}
|