patchpilots 0.1.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 (90) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +230 -0
  3. package/dist/bin/demo.d.ts +2 -0
  4. package/dist/bin/demo.js +5 -0
  5. package/dist/bin/demo.js.map +1 -0
  6. package/dist/bin/patchpilots.d.ts +2 -0
  7. package/dist/bin/patchpilots.js +5 -0
  8. package/dist/bin/patchpilots.js.map +1 -0
  9. package/dist/src/agents/base-agent.d.ts +13 -0
  10. package/dist/src/agents/base-agent.js +23 -0
  11. package/dist/src/agents/base-agent.js.map +1 -0
  12. package/dist/src/agents/coder.d.ts +63 -0
  13. package/dist/src/agents/coder.js +59 -0
  14. package/dist/src/agents/coder.js.map +1 -0
  15. package/dist/src/agents/docs.d.ts +40 -0
  16. package/dist/src/agents/docs.js +45 -0
  17. package/dist/src/agents/docs.js.map +1 -0
  18. package/dist/src/agents/index.d.ts +6 -0
  19. package/dist/src/agents/index.js +7 -0
  20. package/dist/src/agents/index.js.map +1 -0
  21. package/dist/src/agents/planner.d.ts +63 -0
  22. package/dist/src/agents/planner.js +59 -0
  23. package/dist/src/agents/planner.js.map +1 -0
  24. package/dist/src/agents/reviewer.d.ts +60 -0
  25. package/dist/src/agents/reviewer.js +46 -0
  26. package/dist/src/agents/reviewer.js.map +1 -0
  27. package/dist/src/agents/tester.d.ts +47 -0
  28. package/dist/src/agents/tester.js +51 -0
  29. package/dist/src/agents/tester.js.map +1 -0
  30. package/dist/src/cli/commands/docs.d.ts +2 -0
  31. package/dist/src/cli/commands/docs.js +40 -0
  32. package/dist/src/cli/commands/docs.js.map +1 -0
  33. package/dist/src/cli/commands/improve.d.ts +2 -0
  34. package/dist/src/cli/commands/improve.js +42 -0
  35. package/dist/src/cli/commands/improve.js.map +1 -0
  36. package/dist/src/cli/commands/plan.d.ts +2 -0
  37. package/dist/src/cli/commands/plan.js +38 -0
  38. package/dist/src/cli/commands/plan.js.map +1 -0
  39. package/dist/src/cli/commands/review.d.ts +2 -0
  40. package/dist/src/cli/commands/review.js +38 -0
  41. package/dist/src/cli/commands/review.js.map +1 -0
  42. package/dist/src/cli/commands/test.d.ts +2 -0
  43. package/dist/src/cli/commands/test.js +40 -0
  44. package/dist/src/cli/commands/test.js.map +1 -0
  45. package/dist/src/cli/index.d.ts +1 -0
  46. package/dist/src/cli/index.js +2 -0
  47. package/dist/src/cli/index.js.map +1 -0
  48. package/dist/src/cli/program.d.ts +2 -0
  49. package/dist/src/cli/program.js +20 -0
  50. package/dist/src/cli/program.js.map +1 -0
  51. package/dist/src/core/config.d.ts +6 -0
  52. package/dist/src/core/config.js +72 -0
  53. package/dist/src/core/config.js.map +1 -0
  54. package/dist/src/core/llm-client.d.ts +19 -0
  55. package/dist/src/core/llm-client.js +70 -0
  56. package/dist/src/core/llm-client.js.map +1 -0
  57. package/dist/src/core/orchestrator.d.ts +27 -0
  58. package/dist/src/core/orchestrator.js +262 -0
  59. package/dist/src/core/orchestrator.js.map +1 -0
  60. package/dist/src/index.d.ts +5 -0
  61. package/dist/src/index.js +6 -0
  62. package/dist/src/index.js.map +1 -0
  63. package/dist/src/types/agent.d.ts +21 -0
  64. package/dist/src/types/agent.js +2 -0
  65. package/dist/src/types/agent.js.map +1 -0
  66. package/dist/src/types/config.d.ts +11 -0
  67. package/dist/src/types/config.js +10 -0
  68. package/dist/src/types/config.js.map +1 -0
  69. package/dist/src/types/index.d.ts +3 -0
  70. package/dist/src/types/index.js +4 -0
  71. package/dist/src/types/index.js.map +1 -0
  72. package/dist/src/types/review.d.ts +61 -0
  73. package/dist/src/types/review.js +2 -0
  74. package/dist/src/types/review.js.map +1 -0
  75. package/dist/src/utils/banner.d.ts +2 -0
  76. package/dist/src/utils/banner.js +65 -0
  77. package/dist/src/utils/banner.js.map +1 -0
  78. package/dist/src/utils/cost.d.ts +15 -0
  79. package/dist/src/utils/cost.js +46 -0
  80. package/dist/src/utils/cost.js.map +1 -0
  81. package/dist/src/utils/files.d.ts +2 -0
  82. package/dist/src/utils/files.js +65 -0
  83. package/dist/src/utils/files.js.map +1 -0
  84. package/dist/src/utils/formatter.d.ts +7 -0
  85. package/dist/src/utils/formatter.js +190 -0
  86. package/dist/src/utils/formatter.js.map +1 -0
  87. package/dist/src/utils/logger.d.ts +9 -0
  88. package/dist/src/utils/logger.js +28 -0
  89. package/dist/src/utils/logger.js.map +1 -0
  90. package/package.json +57 -0
@@ -0,0 +1,59 @@
1
+ import { z } from "zod";
2
+ import { BaseAgent } from "./base-agent.js";
3
+ const planResultSchema = z.object({
4
+ goal: z.string(),
5
+ tasks: z.array(z.object({
6
+ id: z.number(),
7
+ title: z.string(),
8
+ description: z.string(),
9
+ files: z.array(z.string()),
10
+ priority: z.enum(["high", "medium", "low"]),
11
+ estimatedComplexity: z.enum(["simple", "moderate", "complex"]),
12
+ })),
13
+ risks: z.array(z.string()),
14
+ summary: z.string(),
15
+ });
16
+ export class PlannerAgent extends BaseAgent {
17
+ name = "Planner";
18
+ description = "Breaks down tasks and creates implementation plans";
19
+ taskDescription;
20
+ constructor(llmClient, taskDescription = "") {
21
+ super(llmClient);
22
+ this.taskDescription = taskDescription;
23
+ }
24
+ getOutputSchema() {
25
+ return planResultSchema;
26
+ }
27
+ getSystemPrompt() {
28
+ return `You are a senior software architect and project planner. Your job is to analyze a codebase and break down work into clear, actionable tasks.
29
+
30
+ Rules:
31
+ - Analyze the code structure, dependencies, and patterns before planning
32
+ - Break work into small, focused tasks that can be done independently
33
+ - Order tasks by dependency — things that must happen first come first
34
+ - Identify which files each task will touch
35
+ - Flag risks and potential blockers
36
+ - Assign priority (high/medium/low) and complexity (simple/moderate/complex) to each task
37
+ - Be specific — vague tasks like "refactor code" are not helpful
38
+
39
+ If no specific task is provided, analyze the codebase and suggest improvements, missing features, or technical debt to address.`;
40
+ }
41
+ buildUserMessage(context) {
42
+ const parts = [];
43
+ if (this.taskDescription) {
44
+ parts.push(`## Task to plan\n${this.taskDescription}\n`);
45
+ }
46
+ else {
47
+ parts.push("## Analyze this codebase and suggest a plan for improvements\n");
48
+ }
49
+ parts.push("## Source Files\n");
50
+ for (const file of context.files) {
51
+ parts.push(`### ${file.path} (${file.language})`);
52
+ parts.push("```" + file.language);
53
+ parts.push(file.content);
54
+ parts.push("```\n");
55
+ }
56
+ return parts.join("\n");
57
+ }
58
+ }
59
+ //# sourceMappingURL=planner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"planner.js","sourceRoot":"","sources":["../../../src/agents/planner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,KAAK,EAAE,CAAC,CAAC,KAAK,CACZ,CAAC,CAAC,MAAM,CAAC;QACP,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;QACd,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;QACjB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;QACvB,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;QAC1B,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;QAC3C,mBAAmB,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC;KAC/D,CAAC,CACH;IACD,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAC1B,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;CACpB,CAAC,CAAC;AAEH,MAAM,OAAO,YAAa,SAAQ,SAAqB;IAC5C,IAAI,GAAG,SAAS,CAAC;IACjB,WAAW,GAAG,oDAAoD,CAAC;IAEpE,eAAe,CAAS;IAEhC,YAAY,SAAqD,EAAE,eAAe,GAAG,EAAE;QACrF,KAAK,CAAC,SAAS,CAAC,CAAC;QACjB,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;IACzC,CAAC;IAES,eAAe;QACvB,OAAO,gBAAgB,CAAC;IAC1B,CAAC;IAES,eAAe;QACvB,OAAO;;;;;;;;;;;gIAWqH,CAAC;IAC/H,CAAC;IAES,gBAAgB,CAAC,OAAqB;QAC9C,MAAM,KAAK,GAAa,EAAE,CAAC;QAE3B,IAAI,IAAI,CAAC,eAAe,EAAE,CAAC;YACzB,KAAK,CAAC,IAAI,CAAC,oBAAoB,IAAI,CAAC,eAAe,IAAI,CAAC,CAAC;QAC3D,CAAC;aAAM,CAAC;YACN,KAAK,CAAC,IAAI,CAAC,gEAAgE,CAAC,CAAC;QAC/E,CAAC;QAED,KAAK,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;QAChC,KAAK,MAAM,IAAI,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC;YACjC,KAAK,CAAC,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC;YAClD,KAAK,CAAC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC;YAClC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YACzB,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACtB,CAAC;QAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;CACF"}
@@ -0,0 +1,60 @@
1
+ import { z } from "zod";
2
+ import { BaseAgent } from "./base-agent.js";
3
+ import type { AgentContext } from "../types/index.js";
4
+ import type { ReviewResult } from "../types/review.js";
5
+ export declare class ReviewerAgent extends BaseAgent<ReviewResult> {
6
+ readonly name = "Reviewer";
7
+ readonly description = "Finds bugs, code smells, security issues, and performance problems";
8
+ protected getOutputSchema(): z.ZodObject<{
9
+ findings: z.ZodArray<z.ZodObject<{
10
+ file: z.ZodString;
11
+ line: z.ZodOptional<z.ZodNumber>;
12
+ severity: z.ZodEnum<["critical", "warning", "info"]>;
13
+ category: z.ZodEnum<["bug", "security", "performance", "code-smell", "style"]>;
14
+ title: z.ZodString;
15
+ description: z.ZodString;
16
+ suggestion: z.ZodOptional<z.ZodString>;
17
+ }, "strip", z.ZodTypeAny, {
18
+ file: string;
19
+ severity: "critical" | "warning" | "info";
20
+ category: "bug" | "security" | "performance" | "code-smell" | "style";
21
+ title: string;
22
+ description: string;
23
+ line?: number | undefined;
24
+ suggestion?: string | undefined;
25
+ }, {
26
+ file: string;
27
+ severity: "critical" | "warning" | "info";
28
+ category: "bug" | "security" | "performance" | "code-smell" | "style";
29
+ title: string;
30
+ description: string;
31
+ line?: number | undefined;
32
+ suggestion?: string | undefined;
33
+ }>, "many">;
34
+ summary: z.ZodString;
35
+ }, "strip", z.ZodTypeAny, {
36
+ findings: {
37
+ file: string;
38
+ severity: "critical" | "warning" | "info";
39
+ category: "bug" | "security" | "performance" | "code-smell" | "style";
40
+ title: string;
41
+ description: string;
42
+ line?: number | undefined;
43
+ suggestion?: string | undefined;
44
+ }[];
45
+ summary: string;
46
+ }, {
47
+ findings: {
48
+ file: string;
49
+ severity: "critical" | "warning" | "info";
50
+ category: "bug" | "security" | "performance" | "code-smell" | "style";
51
+ title: string;
52
+ description: string;
53
+ line?: number | undefined;
54
+ suggestion?: string | undefined;
55
+ }[];
56
+ summary: string;
57
+ }>;
58
+ protected getSystemPrompt(): string;
59
+ protected buildUserMessage(context: AgentContext): string;
60
+ }
@@ -0,0 +1,46 @@
1
+ import { z } from "zod";
2
+ import { BaseAgent } from "./base-agent.js";
3
+ const reviewResultSchema = z.object({
4
+ findings: z.array(z.object({
5
+ file: z.string(),
6
+ line: z.number().optional(),
7
+ severity: z.enum(["critical", "warning", "info"]),
8
+ category: z.enum(["bug", "security", "performance", "code-smell", "style"]),
9
+ title: z.string(),
10
+ description: z.string(),
11
+ suggestion: z.string().optional(),
12
+ })),
13
+ summary: z.string(),
14
+ });
15
+ export class ReviewerAgent extends BaseAgent {
16
+ name = "Reviewer";
17
+ description = "Finds bugs, code smells, security issues, and performance problems";
18
+ getOutputSchema() {
19
+ return reviewResultSchema;
20
+ }
21
+ getSystemPrompt() {
22
+ return `You are a senior code reviewer with expertise in software security, performance, and best practices.
23
+
24
+ Your job is to review code and find issues. For each issue, classify it by:
25
+ - **severity**: "critical" (bugs, security holes), "warning" (code smells, performance), or "info" (style, minor improvements)
26
+ - **category**: "bug", "security", "performance", "code-smell", or "style"
27
+
28
+ Be specific:
29
+ - Reference exact file names and line numbers when possible
30
+ - Explain WHY something is a problem, not just WHAT
31
+ - Provide actionable suggestions
32
+
33
+ If the code looks good, return an empty findings array with a positive summary.`;
34
+ }
35
+ buildUserMessage(context) {
36
+ const parts = ["Please review the following code files:\n"];
37
+ for (const file of context.files) {
38
+ parts.push(`## File: ${file.path} (${file.language})`);
39
+ parts.push("```" + file.language);
40
+ parts.push(file.content);
41
+ parts.push("```\n");
42
+ }
43
+ return parts.join("\n");
44
+ }
45
+ }
46
+ //# sourceMappingURL=reviewer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reviewer.js","sourceRoot":"","sources":["../../../src/agents/reviewer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IAClC,QAAQ,EAAE,CAAC,CAAC,KAAK,CACf,CAAC,CAAC,MAAM,CAAC;QACP,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;QAChB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC3B,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;QACjD,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,YAAY,EAAE,OAAO,CAAC,CAAC;QAC3E,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;QACjB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;QACvB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KAClC,CAAC,CACH;IACD,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;CACpB,CAAC,CAAC;AAEH,MAAM,OAAO,aAAc,SAAQ,SAAuB;IAC/C,IAAI,GAAG,UAAU,CAAC;IAClB,WAAW,GAAG,oEAAoE,CAAC;IAElF,eAAe;QACvB,OAAO,kBAAkB,CAAC;IAC5B,CAAC;IAES,eAAe;QACvB,OAAO;;;;;;;;;;;gFAWqE,CAAC;IAC/E,CAAC;IAES,gBAAgB,CAAC,OAAqB;QAC9C,MAAM,KAAK,GAAG,CAAC,2CAA2C,CAAC,CAAC;QAE5D,KAAK,MAAM,IAAI,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC;YACjC,KAAK,CAAC,IAAI,CAAC,YAAY,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC;YACvD,KAAK,CAAC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC;YAClC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YACzB,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACtB,CAAC;QAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;CACF"}
@@ -0,0 +1,47 @@
1
+ import { z } from "zod";
2
+ import { BaseAgent } from "./base-agent.js";
3
+ import type { AgentContext } from "../types/index.js";
4
+ import type { TestResult } from "../types/review.js";
5
+ export declare class TesterAgent extends BaseAgent<TestResult> {
6
+ readonly name = "Tester";
7
+ readonly description = "Generates unit tests for source files";
8
+ private framework;
9
+ constructor(llmClient: ConstructorParameters<typeof BaseAgent>[0], framework?: string);
10
+ protected getOutputSchema(): z.ZodObject<{
11
+ testFiles: z.ZodArray<z.ZodObject<{
12
+ path: z.ZodString;
13
+ sourceFile: z.ZodString;
14
+ content: z.ZodString;
15
+ testCount: z.ZodNumber;
16
+ }, "strip", z.ZodTypeAny, {
17
+ path: string;
18
+ sourceFile: string;
19
+ content: string;
20
+ testCount: number;
21
+ }, {
22
+ path: string;
23
+ sourceFile: string;
24
+ content: string;
25
+ testCount: number;
26
+ }>, "many">;
27
+ summary: z.ZodString;
28
+ }, "strip", z.ZodTypeAny, {
29
+ summary: string;
30
+ testFiles: {
31
+ path: string;
32
+ sourceFile: string;
33
+ content: string;
34
+ testCount: number;
35
+ }[];
36
+ }, {
37
+ summary: string;
38
+ testFiles: {
39
+ path: string;
40
+ sourceFile: string;
41
+ content: string;
42
+ testCount: number;
43
+ }[];
44
+ }>;
45
+ protected getSystemPrompt(): string;
46
+ protected buildUserMessage(context: AgentContext): string;
47
+ }
@@ -0,0 +1,51 @@
1
+ import { z } from "zod";
2
+ import { BaseAgent } from "./base-agent.js";
3
+ const testResultSchema = z.object({
4
+ testFiles: z.array(z.object({
5
+ path: z.string(),
6
+ sourceFile: z.string(),
7
+ content: z.string(),
8
+ testCount: z.number(),
9
+ })),
10
+ summary: z.string(),
11
+ });
12
+ export class TesterAgent extends BaseAgent {
13
+ name = "Tester";
14
+ description = "Generates unit tests for source files";
15
+ framework;
16
+ constructor(llmClient, framework = "vitest") {
17
+ super(llmClient);
18
+ this.framework = framework;
19
+ }
20
+ getOutputSchema() {
21
+ return testResultSchema;
22
+ }
23
+ getSystemPrompt() {
24
+ return `You are a senior test engineer. Your job is to generate comprehensive unit tests for source code files.
25
+
26
+ Rules:
27
+ - Use ${this.framework} as the test framework
28
+ - Import from the source file using correct relative paths
29
+ - Cover happy path, edge cases, and error cases
30
+ - Use descriptive test names that explain what is being tested
31
+ - Mock external dependencies (API calls, file system, network) where needed
32
+ - Group related tests with describe blocks
33
+ - Keep tests focused — one assertion per test when possible
34
+ - Include setup/teardown when needed
35
+
36
+ For each source file, generate a corresponding test file. Place test files next to the source with a .test.ts extension (e.g., utils.ts → utils.test.ts).
37
+
38
+ If a file is purely types/interfaces with no runtime code, skip it and don't generate tests for it.`;
39
+ }
40
+ buildUserMessage(context) {
41
+ const parts = ["Please generate unit tests for the following source files:\n"];
42
+ for (const file of context.files) {
43
+ parts.push(`## File: ${file.path} (${file.language})`);
44
+ parts.push("```" + file.language);
45
+ parts.push(file.content);
46
+ parts.push("```\n");
47
+ }
48
+ return parts.join("\n");
49
+ }
50
+ }
51
+ //# sourceMappingURL=tester.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tester.js","sourceRoot":"","sources":["../../../src/agents/tester.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChC,SAAS,EAAE,CAAC,CAAC,KAAK,CAChB,CAAC,CAAC,MAAM,CAAC;QACP,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;QAChB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;QACtB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;QACnB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;KACtB,CAAC,CACH;IACD,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;CACpB,CAAC,CAAC;AAEH,MAAM,OAAO,WAAY,SAAQ,SAAqB;IAC3C,IAAI,GAAG,QAAQ,CAAC;IAChB,WAAW,GAAG,uCAAuC,CAAC;IAEvD,SAAS,CAAS;IAE1B,YAAY,SAAqD,EAAE,SAAS,GAAG,QAAQ;QACrF,KAAK,CAAC,SAAS,CAAC,CAAC;QACjB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC7B,CAAC;IAES,eAAe;QACvB,OAAO,gBAAgB,CAAC;IAC1B,CAAC;IAES,eAAe;QACvB,OAAO;;;QAGH,IAAI,CAAC,SAAS;;;;;;;;;;;oGAW8E,CAAC;IACnG,CAAC;IAES,gBAAgB,CAAC,OAAqB;QAC9C,MAAM,KAAK,GAAG,CAAC,8DAA8D,CAAC,CAAC;QAE/E,KAAK,MAAM,IAAI,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC;YACjC,KAAK,CAAC,IAAI,CAAC,YAAY,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC;YACvD,KAAK,CAAC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC;YAClC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YACzB,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACtB,CAAC;QAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;CACF"}
@@ -0,0 +1,2 @@
1
+ import type { Command } from "commander";
2
+ export declare function registerDocsCommand(program: Command): void;
@@ -0,0 +1,40 @@
1
+ import { loadConfig } from "../../core/config.js";
2
+ import { Orchestrator } from "../../core/orchestrator.js";
3
+ import { setVerbose } from "../../utils/logger.js";
4
+ import { log } from "../../utils/logger.js";
5
+ import { playBanner } from "../../utils/banner.js";
6
+ export function registerDocsCommand(program) {
7
+ program
8
+ .command("docs <path>")
9
+ .description("Generate documentation for source files")
10
+ .option("-m, --model <model>", "Claude model to use")
11
+ .option("-c, --config <path>", "Path to config file")
12
+ .option("--json", "Output raw JSON", false)
13
+ .option("--verbose", "Show token usage and timing", false)
14
+ .option("--write", "Write documented files to disk", false)
15
+ .option("--backup", "Create .bak files before overwriting", false)
16
+ .action(async (targetPath, opts) => {
17
+ try {
18
+ if (!opts.json)
19
+ await playBanner();
20
+ if (opts.verbose)
21
+ setVerbose(true);
22
+ const config = loadConfig(targetPath, {
23
+ model: opts.model,
24
+ config: opts.config,
25
+ });
26
+ const orchestrator = new Orchestrator(config);
27
+ await orchestrator.generateDocs(targetPath, {
28
+ json: opts.json,
29
+ verbose: opts.verbose,
30
+ write: opts.write,
31
+ backup: opts.backup,
32
+ });
33
+ }
34
+ catch (error) {
35
+ log.error(error instanceof Error ? error.message : String(error));
36
+ process.exit(1);
37
+ }
38
+ });
39
+ }
40
+ //# sourceMappingURL=docs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"docs.js","sourceRoot":"","sources":["../../../../src/cli/commands/docs.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,MAAM,UAAU,mBAAmB,CAAC,OAAgB;IAClD,OAAO;SACJ,OAAO,CAAC,aAAa,CAAC;SACtB,WAAW,CAAC,yCAAyC,CAAC;SACtD,MAAM,CAAC,qBAAqB,EAAE,qBAAqB,CAAC;SACpD,MAAM,CAAC,qBAAqB,EAAE,qBAAqB,CAAC;SACpD,MAAM,CAAC,QAAQ,EAAE,iBAAiB,EAAE,KAAK,CAAC;SAC1C,MAAM,CAAC,WAAW,EAAE,6BAA6B,EAAE,KAAK,CAAC;SACzD,MAAM,CAAC,SAAS,EAAE,gCAAgC,EAAE,KAAK,CAAC;SAC1D,MAAM,CAAC,UAAU,EAAE,sCAAsC,EAAE,KAAK,CAAC;SACjE,MAAM,CAAC,KAAK,EAAE,UAAkB,EAAE,IAAI,EAAE,EAAE;QACzC,IAAI,CAAC;YACH,IAAI,CAAC,IAAI,CAAC,IAAI;gBAAE,MAAM,UAAU,EAAE,CAAC;YACnC,IAAI,IAAI,CAAC,OAAO;gBAAE,UAAU,CAAC,IAAI,CAAC,CAAC;YAEnC,MAAM,MAAM,GAAG,UAAU,CAAC,UAAU,EAAE;gBACpC,KAAK,EAAE,IAAI,CAAC,KAAK;gBACjB,MAAM,EAAE,IAAI,CAAC,MAAM;aACpB,CAAC,CAAC;YAEH,MAAM,YAAY,GAAG,IAAI,YAAY,CAAC,MAAM,CAAC,CAAC;YAC9C,MAAM,YAAY,CAAC,YAAY,CAAC,UAAU,EAAE;gBAC1C,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,OAAO,EAAE,IAAI,CAAC,OAAO;gBACrB,KAAK,EAAE,IAAI,CAAC,KAAK;gBACjB,MAAM,EAAE,IAAI,CAAC,MAAM;aACpB,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,GAAG,CAAC,KAAK,CAAC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;YAClE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { Command } from "commander";
2
+ export declare function registerImproveCommand(program: Command): void;
@@ -0,0 +1,42 @@
1
+ import { loadConfig } from "../../core/config.js";
2
+ import { Orchestrator } from "../../core/orchestrator.js";
3
+ import { setVerbose } from "../../utils/logger.js";
4
+ import { log } from "../../utils/logger.js";
5
+ import { playBanner } from "../../utils/banner.js";
6
+ export function registerImproveCommand(program) {
7
+ program
8
+ .command("improve <path>")
9
+ .description("Review and improve code automatically")
10
+ .option("-m, --model <model>", "Claude model to use")
11
+ .option("-c, --config <path>", "Path to config file")
12
+ .option("--severity <level>", "Minimum severity: critical | warning | info", "info")
13
+ .option("--json", "Output raw JSON", false)
14
+ .option("--verbose", "Show token usage and timing", false)
15
+ .option("--write", "Write improved files to disk", false)
16
+ .option("--backup", "Create .bak files before overwriting", false)
17
+ .action(async (targetPath, opts) => {
18
+ try {
19
+ if (!opts.json)
20
+ await playBanner();
21
+ if (opts.verbose)
22
+ setVerbose(true);
23
+ const config = loadConfig(targetPath, {
24
+ model: opts.model,
25
+ config: opts.config,
26
+ });
27
+ const orchestrator = new Orchestrator(config);
28
+ await orchestrator.improve(targetPath, {
29
+ json: opts.json,
30
+ verbose: opts.verbose,
31
+ severity: opts.severity,
32
+ write: opts.write,
33
+ backup: opts.backup,
34
+ });
35
+ }
36
+ catch (error) {
37
+ log.error(error instanceof Error ? error.message : String(error));
38
+ process.exit(1);
39
+ }
40
+ });
41
+ }
42
+ //# sourceMappingURL=improve.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"improve.js","sourceRoot":"","sources":["../../../../src/cli/commands/improve.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,MAAM,UAAU,sBAAsB,CAAC,OAAgB;IACrD,OAAO;SACJ,OAAO,CAAC,gBAAgB,CAAC;SACzB,WAAW,CAAC,uCAAuC,CAAC;SACpD,MAAM,CAAC,qBAAqB,EAAE,qBAAqB,CAAC;SACpD,MAAM,CAAC,qBAAqB,EAAE,qBAAqB,CAAC;SACpD,MAAM,CAAC,oBAAoB,EAAE,6CAA6C,EAAE,MAAM,CAAC;SACnF,MAAM,CAAC,QAAQ,EAAE,iBAAiB,EAAE,KAAK,CAAC;SAC1C,MAAM,CAAC,WAAW,EAAE,6BAA6B,EAAE,KAAK,CAAC;SACzD,MAAM,CAAC,SAAS,EAAE,8BAA8B,EAAE,KAAK,CAAC;SACxD,MAAM,CAAC,UAAU,EAAE,sCAAsC,EAAE,KAAK,CAAC;SACjE,MAAM,CAAC,KAAK,EAAE,UAAkB,EAAE,IAAI,EAAE,EAAE;QACzC,IAAI,CAAC;YACH,IAAI,CAAC,IAAI,CAAC,IAAI;gBAAE,MAAM,UAAU,EAAE,CAAC;YACnC,IAAI,IAAI,CAAC,OAAO;gBAAE,UAAU,CAAC,IAAI,CAAC,CAAC;YAEnC,MAAM,MAAM,GAAG,UAAU,CAAC,UAAU,EAAE;gBACpC,KAAK,EAAE,IAAI,CAAC,KAAK;gBACjB,MAAM,EAAE,IAAI,CAAC,MAAM;aACpB,CAAC,CAAC;YAEH,MAAM,YAAY,GAAG,IAAI,YAAY,CAAC,MAAM,CAAC,CAAC;YAC9C,MAAM,YAAY,CAAC,OAAO,CAAC,UAAU,EAAE;gBACrC,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,OAAO,EAAE,IAAI,CAAC,OAAO;gBACrB,QAAQ,EAAE,IAAI,CAAC,QAAQ;gBACvB,KAAK,EAAE,IAAI,CAAC,KAAK;gBACjB,MAAM,EAAE,IAAI,CAAC,MAAM;aACpB,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,GAAG,CAAC,KAAK,CAAC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;YAClE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { Command } from "commander";
2
+ export declare function registerPlanCommand(program: Command): void;
@@ -0,0 +1,38 @@
1
+ import { loadConfig } from "../../core/config.js";
2
+ import { Orchestrator } from "../../core/orchestrator.js";
3
+ import { setVerbose } from "../../utils/logger.js";
4
+ import { log } from "../../utils/logger.js";
5
+ import { playBanner } from "../../utils/banner.js";
6
+ export function registerPlanCommand(program) {
7
+ program
8
+ .command("plan <path>")
9
+ .description("Analyze codebase and create an implementation plan")
10
+ .option("-m, --model <model>", "Claude model to use")
11
+ .option("-c, --config <path>", "Path to config file")
12
+ .option("-t, --task <description>", "Specific task to plan for")
13
+ .option("--json", "Output raw JSON", false)
14
+ .option("--verbose", "Show token usage and timing", false)
15
+ .action(async (targetPath, opts) => {
16
+ try {
17
+ if (!opts.json)
18
+ await playBanner();
19
+ if (opts.verbose)
20
+ setVerbose(true);
21
+ const config = loadConfig(targetPath, {
22
+ model: opts.model,
23
+ config: opts.config,
24
+ });
25
+ const orchestrator = new Orchestrator(config);
26
+ await orchestrator.plan(targetPath, {
27
+ json: opts.json,
28
+ verbose: opts.verbose,
29
+ task: opts.task,
30
+ });
31
+ }
32
+ catch (error) {
33
+ log.error(error instanceof Error ? error.message : String(error));
34
+ process.exit(1);
35
+ }
36
+ });
37
+ }
38
+ //# sourceMappingURL=plan.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plan.js","sourceRoot":"","sources":["../../../../src/cli/commands/plan.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,MAAM,UAAU,mBAAmB,CAAC,OAAgB;IAClD,OAAO;SACJ,OAAO,CAAC,aAAa,CAAC;SACtB,WAAW,CAAC,oDAAoD,CAAC;SACjE,MAAM,CAAC,qBAAqB,EAAE,qBAAqB,CAAC;SACpD,MAAM,CAAC,qBAAqB,EAAE,qBAAqB,CAAC;SACpD,MAAM,CAAC,0BAA0B,EAAE,2BAA2B,CAAC;SAC/D,MAAM,CAAC,QAAQ,EAAE,iBAAiB,EAAE,KAAK,CAAC;SAC1C,MAAM,CAAC,WAAW,EAAE,6BAA6B,EAAE,KAAK,CAAC;SACzD,MAAM,CAAC,KAAK,EAAE,UAAkB,EAAE,IAAI,EAAE,EAAE;QACzC,IAAI,CAAC;YACH,IAAI,CAAC,IAAI,CAAC,IAAI;gBAAE,MAAM,UAAU,EAAE,CAAC;YACnC,IAAI,IAAI,CAAC,OAAO;gBAAE,UAAU,CAAC,IAAI,CAAC,CAAC;YAEnC,MAAM,MAAM,GAAG,UAAU,CAAC,UAAU,EAAE;gBACpC,KAAK,EAAE,IAAI,CAAC,KAAK;gBACjB,MAAM,EAAE,IAAI,CAAC,MAAM;aACpB,CAAC,CAAC;YAEH,MAAM,YAAY,GAAG,IAAI,YAAY,CAAC,MAAM,CAAC,CAAC;YAC9C,MAAM,YAAY,CAAC,IAAI,CAAC,UAAU,EAAE;gBAClC,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,OAAO,EAAE,IAAI,CAAC,OAAO;gBACrB,IAAI,EAAE,IAAI,CAAC,IAAI;aAChB,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,GAAG,CAAC,KAAK,CAAC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;YAClE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { Command } from "commander";
2
+ export declare function registerReviewCommand(program: Command): void;
@@ -0,0 +1,38 @@
1
+ import { loadConfig } from "../../core/config.js";
2
+ import { Orchestrator } from "../../core/orchestrator.js";
3
+ import { setVerbose } from "../../utils/logger.js";
4
+ import { log } from "../../utils/logger.js";
5
+ import { playBanner } from "../../utils/banner.js";
6
+ export function registerReviewCommand(program) {
7
+ program
8
+ .command("review <path>")
9
+ .description("Review code for bugs, security issues, and code smells")
10
+ .option("-m, --model <model>", "Claude model to use")
11
+ .option("-c, --config <path>", "Path to config file")
12
+ .option("--severity <level>", "Minimum severity: critical | warning | info", "info")
13
+ .option("--json", "Output raw JSON", false)
14
+ .option("--verbose", "Show token usage and timing", false)
15
+ .action(async (targetPath, opts) => {
16
+ try {
17
+ if (!opts.json)
18
+ await playBanner();
19
+ if (opts.verbose)
20
+ setVerbose(true);
21
+ const config = loadConfig(targetPath, {
22
+ model: opts.model,
23
+ config: opts.config,
24
+ });
25
+ const orchestrator = new Orchestrator(config);
26
+ await orchestrator.review(targetPath, {
27
+ json: opts.json,
28
+ verbose: opts.verbose,
29
+ severity: opts.severity,
30
+ });
31
+ }
32
+ catch (error) {
33
+ log.error(error instanceof Error ? error.message : String(error));
34
+ process.exit(1);
35
+ }
36
+ });
37
+ }
38
+ //# sourceMappingURL=review.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"review.js","sourceRoot":"","sources":["../../../../src/cli/commands/review.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,MAAM,UAAU,qBAAqB,CAAC,OAAgB;IACpD,OAAO;SACJ,OAAO,CAAC,eAAe,CAAC;SACxB,WAAW,CAAC,wDAAwD,CAAC;SACrE,MAAM,CAAC,qBAAqB,EAAE,qBAAqB,CAAC;SACpD,MAAM,CAAC,qBAAqB,EAAE,qBAAqB,CAAC;SACpD,MAAM,CAAC,oBAAoB,EAAE,6CAA6C,EAAE,MAAM,CAAC;SACnF,MAAM,CAAC,QAAQ,EAAE,iBAAiB,EAAE,KAAK,CAAC;SAC1C,MAAM,CAAC,WAAW,EAAE,6BAA6B,EAAE,KAAK,CAAC;SACzD,MAAM,CAAC,KAAK,EAAE,UAAkB,EAAE,IAAI,EAAE,EAAE;QACzC,IAAI,CAAC;YACH,IAAI,CAAC,IAAI,CAAC,IAAI;gBAAE,MAAM,UAAU,EAAE,CAAC;YACnC,IAAI,IAAI,CAAC,OAAO;gBAAE,UAAU,CAAC,IAAI,CAAC,CAAC;YAEnC,MAAM,MAAM,GAAG,UAAU,CAAC,UAAU,EAAE;gBACpC,KAAK,EAAE,IAAI,CAAC,KAAK;gBACjB,MAAM,EAAE,IAAI,CAAC,MAAM;aACpB,CAAC,CAAC;YAEH,MAAM,YAAY,GAAG,IAAI,YAAY,CAAC,MAAM,CAAC,CAAC;YAC9C,MAAM,YAAY,CAAC,MAAM,CAAC,UAAU,EAAE;gBACpC,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,OAAO,EAAE,IAAI,CAAC,OAAO;gBACrB,QAAQ,EAAE,IAAI,CAAC,QAAQ;aACxB,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,GAAG,CAAC,KAAK,CAAC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;YAClE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { Command } from "commander";
2
+ export declare function registerTestCommand(program: Command): void;
@@ -0,0 +1,40 @@
1
+ import { loadConfig } from "../../core/config.js";
2
+ import { Orchestrator } from "../../core/orchestrator.js";
3
+ import { setVerbose } from "../../utils/logger.js";
4
+ import { log } from "../../utils/logger.js";
5
+ import { playBanner } from "../../utils/banner.js";
6
+ export function registerTestCommand(program) {
7
+ program
8
+ .command("test <path>")
9
+ .description("Generate unit tests for source files")
10
+ .option("-m, --model <model>", "Claude model to use")
11
+ .option("-c, --config <path>", "Path to config file")
12
+ .option("--json", "Output raw JSON", false)
13
+ .option("--verbose", "Show token usage and timing", false)
14
+ .option("--write", "Write test files to disk", false)
15
+ .option("--framework <name>", "Test framework to use", "vitest")
16
+ .action(async (targetPath, opts) => {
17
+ try {
18
+ if (!opts.json)
19
+ await playBanner();
20
+ if (opts.verbose)
21
+ setVerbose(true);
22
+ const config = loadConfig(targetPath, {
23
+ model: opts.model,
24
+ config: opts.config,
25
+ });
26
+ const orchestrator = new Orchestrator(config);
27
+ await orchestrator.generateTests(targetPath, {
28
+ json: opts.json,
29
+ verbose: opts.verbose,
30
+ write: opts.write,
31
+ framework: opts.framework,
32
+ });
33
+ }
34
+ catch (error) {
35
+ log.error(error instanceof Error ? error.message : String(error));
36
+ process.exit(1);
37
+ }
38
+ });
39
+ }
40
+ //# sourceMappingURL=test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test.js","sourceRoot":"","sources":["../../../../src/cli/commands/test.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,MAAM,UAAU,mBAAmB,CAAC,OAAgB;IAClD,OAAO;SACJ,OAAO,CAAC,aAAa,CAAC;SACtB,WAAW,CAAC,sCAAsC,CAAC;SACnD,MAAM,CAAC,qBAAqB,EAAE,qBAAqB,CAAC;SACpD,MAAM,CAAC,qBAAqB,EAAE,qBAAqB,CAAC;SACpD,MAAM,CAAC,QAAQ,EAAE,iBAAiB,EAAE,KAAK,CAAC;SAC1C,MAAM,CAAC,WAAW,EAAE,6BAA6B,EAAE,KAAK,CAAC;SACzD,MAAM,CAAC,SAAS,EAAE,0BAA0B,EAAE,KAAK,CAAC;SACpD,MAAM,CAAC,oBAAoB,EAAE,uBAAuB,EAAE,QAAQ,CAAC;SAC/D,MAAM,CAAC,KAAK,EAAE,UAAkB,EAAE,IAAI,EAAE,EAAE;QACzC,IAAI,CAAC;YACH,IAAI,CAAC,IAAI,CAAC,IAAI;gBAAE,MAAM,UAAU,EAAE,CAAC;YACnC,IAAI,IAAI,CAAC,OAAO;gBAAE,UAAU,CAAC,IAAI,CAAC,CAAC;YAEnC,MAAM,MAAM,GAAG,UAAU,CAAC,UAAU,EAAE;gBACpC,KAAK,EAAE,IAAI,CAAC,KAAK;gBACjB,MAAM,EAAE,IAAI,CAAC,MAAM;aACpB,CAAC,CAAC;YAEH,MAAM,YAAY,GAAG,IAAI,YAAY,CAAC,MAAM,CAAC,CAAC;YAC9C,MAAM,YAAY,CAAC,aAAa,CAAC,UAAU,EAAE;gBAC3C,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,OAAO,EAAE,IAAI,CAAC,OAAO;gBACrB,KAAK,EAAE,IAAI,CAAC,KAAK;gBACjB,SAAS,EAAE,IAAI,CAAC,SAAS;aAC1B,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,GAAG,CAAC,KAAK,CAAC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;YAClE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1 @@
1
+ export { createProgram } from "./program.js";
@@ -0,0 +1,2 @@
1
+ export { createProgram } from "./program.js";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/cli/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { Command } from "commander";
2
+ export declare function createProgram(): Command;
@@ -0,0 +1,20 @@
1
+ import { Command } from "commander";
2
+ import { registerReviewCommand } from "./commands/review.js";
3
+ import { registerImproveCommand } from "./commands/improve.js";
4
+ import { registerTestCommand } from "./commands/test.js";
5
+ import { registerPlanCommand } from "./commands/plan.js";
6
+ import { registerDocsCommand } from "./commands/docs.js";
7
+ export function createProgram() {
8
+ const program = new Command();
9
+ program
10
+ .name("patchpilots")
11
+ .description("🎯 A team of AI agents that reviews and improves your code")
12
+ .version("0.1.0");
13
+ registerReviewCommand(program);
14
+ registerImproveCommand(program);
15
+ registerTestCommand(program);
16
+ registerPlanCommand(program);
17
+ registerDocsCommand(program);
18
+ return program;
19
+ }
20
+ //# sourceMappingURL=program.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"program.js","sourceRoot":"","sources":["../../../src/cli/program.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAEzD,MAAM,UAAU,aAAa;IAC3B,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;IAE9B,OAAO;SACJ,IAAI,CAAC,aAAa,CAAC;SACnB,WAAW,CAAC,4DAA4D,CAAC;SACzE,OAAO,CAAC,OAAO,CAAC,CAAC;IAEpB,qBAAqB,CAAC,OAAO,CAAC,CAAC;IAC/B,sBAAsB,CAAC,OAAO,CAAC,CAAC;IAChC,mBAAmB,CAAC,OAAO,CAAC,CAAC;IAC7B,mBAAmB,CAAC,OAAO,CAAC,CAAC;IAC7B,mBAAmB,CAAC,OAAO,CAAC,CAAC;IAE7B,OAAO,OAAO,CAAC;AACjB,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { type PatchPilotsConfig } from "../types/index.js";
2
+ export interface CLIOptions {
3
+ model?: string;
4
+ config?: string;
5
+ }
6
+ export declare function loadConfig(targetPath: string, cliOptions?: CLIOptions): PatchPilotsConfig;