@klitchevo/code-council 0.0.1 → 0.0.3

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 (56) hide show
  1. package/README.md +65 -28
  2. package/dist/index.d.ts +0 -6
  3. package/dist/index.js +627 -57
  4. package/package.json +4 -3
  5. package/dist/config.d.ts +0 -48
  6. package/dist/config.d.ts.map +0 -1
  7. package/dist/config.js +0 -61
  8. package/dist/constants.d.ts +0 -33
  9. package/dist/constants.d.ts.map +0 -1
  10. package/dist/constants.js +0 -36
  11. package/dist/errors.d.ts +0 -53
  12. package/dist/errors.d.ts.map +0 -1
  13. package/dist/errors.js +0 -92
  14. package/dist/index.d.ts.map +0 -1
  15. package/dist/logger.d.ts +0 -22
  16. package/dist/logger.d.ts.map +0 -1
  17. package/dist/logger.js +0 -62
  18. package/dist/prompts/backend-review.d.ts +0 -6
  19. package/dist/prompts/backend-review.d.ts.map +0 -1
  20. package/dist/prompts/backend-review.js +0 -28
  21. package/dist/prompts/code-review.d.ts +0 -6
  22. package/dist/prompts/code-review.d.ts.map +0 -1
  23. package/dist/prompts/code-review.js +0 -18
  24. package/dist/prompts/frontend-review.d.ts +0 -6
  25. package/dist/prompts/frontend-review.d.ts.map +0 -1
  26. package/dist/prompts/frontend-review.js +0 -28
  27. package/dist/prompts/plan-review.d.ts +0 -6
  28. package/dist/prompts/plan-review.d.ts.map +0 -1
  29. package/dist/prompts/plan-review.js +0 -29
  30. package/dist/review-client.d.ts +0 -75
  31. package/dist/review-client.d.ts.map +0 -1
  32. package/dist/review-client.js +0 -116
  33. package/dist/schemas.d.ts +0 -60
  34. package/dist/schemas.d.ts.map +0 -1
  35. package/dist/schemas.js +0 -46
  36. package/dist/tools/factory.d.ts +0 -20
  37. package/dist/tools/factory.d.ts.map +0 -1
  38. package/dist/tools/factory.js +0 -55
  39. package/dist/tools/list-config.d.ts +0 -9
  40. package/dist/tools/list-config.d.ts.map +0 -1
  41. package/dist/tools/list-config.js +0 -31
  42. package/dist/tools/review-backend.d.ts +0 -22
  43. package/dist/tools/review-backend.d.ts.map +0 -1
  44. package/dist/tools/review-backend.js +0 -38
  45. package/dist/tools/review-code.d.ts +0 -15
  46. package/dist/tools/review-code.d.ts.map +0 -1
  47. package/dist/tools/review-code.js +0 -29
  48. package/dist/tools/review-frontend.d.ts +0 -22
  49. package/dist/tools/review-frontend.d.ts.map +0 -1
  50. package/dist/tools/review-frontend.js +0 -38
  51. package/dist/tools/review-plan.d.ts +0 -22
  52. package/dist/tools/review-plan.d.ts.map +0 -1
  53. package/dist/tools/review-plan.js +0 -35
  54. package/dist/utils/parallel-executor.d.ts +0 -10
  55. package/dist/utils/parallel-executor.d.ts.map +0 -1
  56. package/dist/utils/parallel-executor.js +0 -21
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@klitchevo/code-council",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "description": "Multi-model AI code review server using OpenRouter - get diverse perspectives from multiple LLMs in parallel",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -17,9 +17,9 @@
17
17
  ".env.example"
18
18
  ],
19
19
  "scripts": {
20
- "build": "tsc",
20
+ "build": "tsup",
21
21
  "start": "node dist/index.js",
22
- "dev": "tsc --watch",
22
+ "dev": "tsup --watch",
23
23
  "test": "vitest run",
24
24
  "test:watch": "vitest",
25
25
  "test:coverage": "vitest run --coverage",
@@ -72,6 +72,7 @@
72
72
  "@types/node": "25.0.3",
73
73
  "@vitest/coverage-v8": "4.0.16",
74
74
  "lefthook": "2.0.12",
75
+ "tsup": "^8.5.1",
75
76
  "typescript": "5.9.3",
76
77
  "vitest": "4.0.16"
77
78
  },
package/dist/config.d.ts DELETED
@@ -1,48 +0,0 @@
1
- /**
2
- * Configuration for Code Council MCP Server
3
- *
4
- * Models are configured via environment variables as arrays of strings.
5
- *
6
- * Find models at: https://openrouter.ai/models
7
- *
8
- * Example MCP config:
9
- * {
10
- * "env": {
11
- * "OPENROUTER_API_KEY": "your-key",
12
- * "CODE_REVIEW_MODELS": ["anthropic/claude-3.5-sonnet", "openai/gpt-4-turbo"]
13
- * }
14
- * }
15
- *
16
- * Single model:
17
- * {
18
- * "env": {
19
- * "CODE_REVIEW_MODELS": ["anthropic/claude-3.5-sonnet"]
20
- * }
21
- * }
22
- *
23
- * If not configured, defaults to minimax/minimax-m2.1 and x-ai/grok-code-fast-1
24
- */
25
- /**
26
- * Parse model list from environment variable
27
- * Accepts: array of strings only
28
- * Exported for testing
29
- */
30
- export declare function parseModels(envVar: string | string[] | undefined, defaults: string[]): string[];
31
- /**
32
- * Models to use for code review (runs in parallel)
33
- */
34
- export declare const CODE_REVIEW_MODELS: string[];
35
- /**
36
- * Models to use for frontend review (runs in parallel)
37
- */
38
- export declare const FRONTEND_REVIEW_MODELS: string[];
39
- /**
40
- * Models to use for backend review (runs in parallel)
41
- */
42
- export declare const BACKEND_REVIEW_MODELS: string[];
43
- /**
44
- * Models to use for plan review (runs in parallel)
45
- * Reviews implementation plans before code is written
46
- */
47
- export declare const PLAN_REVIEW_MODELS: string[];
48
- //# sourceMappingURL=config.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAIH;;;;GAIG;AACH,wBAAgB,WAAW,CAC1B,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,EACrC,QAAQ,EAAE,MAAM,EAAE,GAChB,MAAM,EAAE,CAgBV;AAED;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,MAAM,EAGtC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,sBAAsB,EAAE,MAAM,EAG1C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,qBAAqB,EAAE,MAAM,EAGzC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,kBAAkB,EAAE,MAAM,EAGtC,CAAC"}
package/dist/config.js DELETED
@@ -1,61 +0,0 @@
1
- /**
2
- * Configuration for Code Council MCP Server
3
- *
4
- * Models are configured via environment variables as arrays of strings.
5
- *
6
- * Find models at: https://openrouter.ai/models
7
- *
8
- * Example MCP config:
9
- * {
10
- * "env": {
11
- * "OPENROUTER_API_KEY": "your-key",
12
- * "CODE_REVIEW_MODELS": ["anthropic/claude-3.5-sonnet", "openai/gpt-4-turbo"]
13
- * }
14
- * }
15
- *
16
- * Single model:
17
- * {
18
- * "env": {
19
- * "CODE_REVIEW_MODELS": ["anthropic/claude-3.5-sonnet"]
20
- * }
21
- * }
22
- *
23
- * If not configured, defaults to minimax/minimax-m2.1 and x-ai/grok-code-fast-1
24
- */
25
- import { DEFAULT_MODELS } from "./constants";
26
- /**
27
- * Parse model list from environment variable
28
- * Accepts: array of strings only
29
- * Exported for testing
30
- */
31
- export function parseModels(envVar, defaults) {
32
- // Not configured - use defaults
33
- if (envVar === undefined || envVar === null) {
34
- return defaults;
35
- }
36
- // Must be an array
37
- if (Array.isArray(envVar)) {
38
- const filtered = envVar.filter((m) => m && m.trim().length > 0);
39
- return filtered.length > 0 ? filtered : defaults;
40
- }
41
- // String provided - invalid format - throw error
42
- throw new Error(`Model configuration must be an array of strings, got: ${typeof envVar}. Example: ["anthropic/claude-3.5-sonnet", "openai/gpt-4-turbo"]`);
43
- }
44
- /**
45
- * Models to use for code review (runs in parallel)
46
- */
47
- export const CODE_REVIEW_MODELS = parseModels(process.env.CODE_REVIEW_MODELS, DEFAULT_MODELS);
48
- /**
49
- * Models to use for frontend review (runs in parallel)
50
- */
51
- export const FRONTEND_REVIEW_MODELS = parseModels(process.env.FRONTEND_REVIEW_MODELS, DEFAULT_MODELS);
52
- /**
53
- * Models to use for backend review (runs in parallel)
54
- */
55
- export const BACKEND_REVIEW_MODELS = parseModels(process.env.BACKEND_REVIEW_MODELS, DEFAULT_MODELS);
56
- /**
57
- * Models to use for plan review (runs in parallel)
58
- * Reviews implementation plans before code is written
59
- */
60
- export const PLAN_REVIEW_MODELS = parseModels(process.env.PLAN_REVIEW_MODELS, DEFAULT_MODELS);
61
- //# sourceMappingURL=config.js.map
@@ -1,33 +0,0 @@
1
- /**
2
- * Application-wide constants and configuration values.
3
- * Extracted from inline "magic numbers" for maintainability.
4
- */
5
- /**
6
- * Maximum input sizes to prevent abuse and excessive API costs
7
- */
8
- export declare const INPUT_LIMITS: {
9
- /** Maximum code length in characters (100KB) */
10
- readonly MAX_CODE_LENGTH: 100000;
11
- /** Maximum context length in characters */
12
- readonly MAX_CONTEXT_LENGTH: 5000;
13
- /** Maximum language name length */
14
- readonly MAX_LANGUAGE_LENGTH: 50;
15
- /** Maximum plan length in characters */
16
- readonly MAX_PLAN_LENGTH: 50000;
17
- /** Maximum number of models to run in parallel */
18
- readonly MAX_MODELS: 10;
19
- };
20
- /**
21
- * OpenRouter API configuration
22
- */
23
- export declare const LLM_CONFIG: {
24
- /** Default temperature for model responses */
25
- readonly DEFAULT_TEMPERATURE: 0.3;
26
- /** Default max tokens for responses */
27
- readonly DEFAULT_MAX_TOKENS: 4096;
28
- };
29
- /**
30
- * Default models if not configured via environment variables
31
- */
32
- export declare const DEFAULT_MODELS: string[];
33
- //# sourceMappingURL=constants.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,eAAO,MAAM,YAAY;IACxB,gDAAgD;;IAEhD,2CAA2C;;IAE3C,mCAAmC;;IAEnC,wCAAwC;;IAExC,kDAAkD;;CAEzC,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,UAAU;IACtB,8CAA8C;;IAE9C,uCAAuC;;CAE9B,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,MAAM,EAGlC,CAAC"}
package/dist/constants.js DELETED
@@ -1,36 +0,0 @@
1
- /**
2
- * Application-wide constants and configuration values.
3
- * Extracted from inline "magic numbers" for maintainability.
4
- */
5
- /**
6
- * Maximum input sizes to prevent abuse and excessive API costs
7
- */
8
- export const INPUT_LIMITS = {
9
- /** Maximum code length in characters (100KB) */
10
- MAX_CODE_LENGTH: 100_000,
11
- /** Maximum context length in characters */
12
- MAX_CONTEXT_LENGTH: 5_000,
13
- /** Maximum language name length */
14
- MAX_LANGUAGE_LENGTH: 50,
15
- /** Maximum plan length in characters */
16
- MAX_PLAN_LENGTH: 50_000,
17
- /** Maximum number of models to run in parallel */
18
- MAX_MODELS: 10,
19
- };
20
- /**
21
- * OpenRouter API configuration
22
- */
23
- export const LLM_CONFIG = {
24
- /** Default temperature for model responses */
25
- DEFAULT_TEMPERATURE: 0.3,
26
- /** Default max tokens for responses */
27
- DEFAULT_MAX_TOKENS: 4096,
28
- };
29
- /**
30
- * Default models if not configured via environment variables
31
- */
32
- export const DEFAULT_MODELS = [
33
- "minimax/minimax-m2.1",
34
- "x-ai/grok-code-fast-1",
35
- ];
36
- //# sourceMappingURL=constants.js.map
package/dist/errors.d.ts DELETED
@@ -1,53 +0,0 @@
1
- /**
2
- * Custom error classes for better error handling and user feedback.
3
- */
4
- /**
5
- * Base error class for all application errors
6
- */
7
- export declare class AppError extends Error {
8
- readonly code: string;
9
- readonly userMessage?: string | undefined;
10
- constructor(message: string, code: string, userMessage?: string | undefined);
11
- }
12
- /**
13
- * Error thrown when OpenRouter API calls fail
14
- */
15
- export declare class OpenRouterError extends AppError {
16
- readonly statusCode?: number | undefined;
17
- readonly retryable: boolean;
18
- constructor(message: string, statusCode?: number | undefined, retryable?: boolean);
19
- }
20
- /**
21
- * Error thrown when configuration is invalid
22
- */
23
- export declare class ConfigurationError extends AppError {
24
- readonly field: string;
25
- constructor(message: string, field: string);
26
- }
27
- /**
28
- * Error thrown when input validation fails
29
- */
30
- export declare class ValidationError extends AppError {
31
- readonly field: string;
32
- constructor(message: string, field: string);
33
- }
34
- /**
35
- * MCP tool response type
36
- */
37
- type MCPToolResponse = {
38
- content: Array<{
39
- type: "text";
40
- text: string;
41
- }>;
42
- isError?: boolean;
43
- };
44
- /**
45
- * Format any error for display to users (string format)
46
- */
47
- export declare function formatErrorMessage(error: unknown): string;
48
- /**
49
- * Format error for MCP tool response
50
- */
51
- export declare function formatError(error: unknown): MCPToolResponse;
52
- export {};
53
- //# sourceMappingURL=errors.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,qBAAa,QAAS,SAAQ,KAAK;aAGjB,IAAI,EAAE,MAAM;aACZ,WAAW,CAAC,EAAE,MAAM;gBAFpC,OAAO,EAAE,MAAM,EACC,IAAI,EAAE,MAAM,EACZ,WAAW,CAAC,EAAE,MAAM,YAAA;CAMrC;AAED;;GAEG;AACH,qBAAa,eAAgB,SAAQ,QAAQ;aAG3B,UAAU,CAAC,EAAE,MAAM;aACnB,SAAS,EAAE,OAAO;gBAFlC,OAAO,EAAE,MAAM,EACC,UAAU,CAAC,EAAE,MAAM,YAAA,EACnB,SAAS,GAAE,OAAe;CAU3C;AAED;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,QAAQ;aAG9B,KAAK,EAAE,MAAM;gBAD7B,OAAO,EAAE,MAAM,EACC,KAAK,EAAE,MAAM;CAI9B;AAED;;GAEG;AACH,qBAAa,eAAgB,SAAQ,QAAQ;aAG3B,KAAK,EAAE,MAAM;gBAD7B,OAAO,EAAE,MAAM,EACC,KAAK,EAAE,MAAM;CAQ9B;AAED;;GAEG;AACH,KAAK,eAAe,GAAG;IACtB,OAAO,EAAE,KAAK,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;KACb,CAAC,CAAC;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CA0BzD;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,eAAe,CAU3D"}
package/dist/errors.js DELETED
@@ -1,92 +0,0 @@
1
- /**
2
- * Custom error classes for better error handling and user feedback.
3
- */
4
- /**
5
- * Base error class for all application errors
6
- */
7
- export class AppError extends Error {
8
- code;
9
- userMessage;
10
- constructor(message, code, userMessage) {
11
- super(message);
12
- this.code = code;
13
- this.userMessage = userMessage;
14
- this.name = this.constructor.name;
15
- Error.captureStackTrace(this, this.constructor);
16
- }
17
- }
18
- /**
19
- * Error thrown when OpenRouter API calls fail
20
- */
21
- export class OpenRouterError extends AppError {
22
- statusCode;
23
- retryable;
24
- constructor(message, statusCode, retryable = false) {
25
- super(message, "OPENROUTER_ERROR", retryable
26
- ? "The AI service is temporarily unavailable. Please try again in a moment."
27
- : "Unable to complete the review. Please check your API key and try again.");
28
- this.statusCode = statusCode;
29
- this.retryable = retryable;
30
- }
31
- }
32
- /**
33
- * Error thrown when configuration is invalid
34
- */
35
- export class ConfigurationError extends AppError {
36
- field;
37
- constructor(message, field) {
38
- super(message, "CONFIGURATION_ERROR", `Configuration error: ${message}`);
39
- this.field = field;
40
- }
41
- }
42
- /**
43
- * Error thrown when input validation fails
44
- */
45
- export class ValidationError extends AppError {
46
- field;
47
- constructor(message, field) {
48
- super(message, "VALIDATION_ERROR", `Invalid input for ${field}: ${message}`);
49
- this.field = field;
50
- }
51
- }
52
- /**
53
- * Format any error for display to users (string format)
54
- */
55
- export function formatErrorMessage(error) {
56
- if (error instanceof AppError) {
57
- return error.userMessage || error.message;
58
- }
59
- if (error instanceof Error) {
60
- // Sanitize error messages to avoid leaking sensitive info
61
- const sanitized = error.message
62
- .replace(/sk-or-v1-[a-zA-Z0-9]+/g, "[REDACTED]")
63
- .replace(/Bearer [a-zA-Z0-9-_]+/g, "Bearer [REDACTED]");
64
- // Map common errors to user-friendly messages
65
- if (sanitized.includes("401") || sanitized.includes("Unauthorized")) {
66
- return "API authentication failed. Please check your OPENROUTER_API_KEY environment variable.";
67
- }
68
- if (sanitized.includes("429") || sanitized.includes("rate limit")) {
69
- return "Rate limit exceeded. Please wait a moment and try again.";
70
- }
71
- if (sanitized.includes("timeout") || sanitized.includes("ETIMEDOUT")) {
72
- return "Request timed out. The AI service may be slow. Please try again.";
73
- }
74
- return sanitized;
75
- }
76
- return "An unexpected error occurred. Please try again.";
77
- }
78
- /**
79
- * Format error for MCP tool response
80
- */
81
- export function formatError(error) {
82
- return {
83
- content: [
84
- {
85
- type: "text",
86
- text: `Error: ${formatErrorMessage(error)}`,
87
- },
88
- ],
89
- isError: true,
90
- };
91
- }
92
- //# sourceMappingURL=errors.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;GAGG;AAEH,OAAO,eAAe,CAAC"}
package/dist/logger.d.ts DELETED
@@ -1,22 +0,0 @@
1
- /**
2
- * Structured logging utility for better observability.
3
- * Logs to stderr in JSON format for easy parsing.
4
- */
5
- interface LogContext {
6
- [key: string]: unknown;
7
- }
8
- declare class Logger {
9
- private isDevelopment;
10
- private debugEnabled;
11
- private log;
12
- debug(message: string, context?: LogContext): void;
13
- info(message: string, context?: LogContext): void;
14
- warn(message: string, context?: LogContext): void;
15
- error(message: string, error?: Error | unknown, context?: LogContext): void;
16
- }
17
- /**
18
- * Global logger instance
19
- */
20
- export declare const logger: Logger;
21
- export {};
22
- //# sourceMappingURL=logger.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../src/logger.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,UAAU,UAAU;IACnB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACvB;AAED,cAAM,MAAM;IACX,OAAO,CAAC,aAAa,CAA0C;IAC/D,OAAO,CAAC,YAAY,CAAgC;IAEpD,OAAO,CAAC,GAAG;IA2BX,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,UAAU,GAAG,IAAI;IAMlD,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,UAAU,GAAG,IAAI;IAIjD,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,UAAU,GAAG,IAAI;IAIjD,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK,GAAG,OAAO,EAAE,OAAO,CAAC,EAAE,UAAU,GAAG,IAAI;CAiB3E;AAED;;GAEG;AACH,eAAO,MAAM,MAAM,QAAe,CAAC"}
package/dist/logger.js DELETED
@@ -1,62 +0,0 @@
1
- /**
2
- * Structured logging utility for better observability.
3
- * Logs to stderr in JSON format for easy parsing.
4
- */
5
- class Logger {
6
- isDevelopment = process.env.NODE_ENV === "development";
7
- debugEnabled = process.env.DEBUG === "true";
8
- log(level, message, context) {
9
- const logEntry = {
10
- timestamp: new Date().toISOString(),
11
- level,
12
- message,
13
- ...context,
14
- };
15
- // In development, use pretty printing
16
- if (this.isDevelopment) {
17
- const emoji = {
18
- debug: "🔍",
19
- info: "ℹ️",
20
- warn: "⚠️",
21
- error: "❌",
22
- }[level];
23
- console.error(`${emoji} [${level.toUpperCase()}] ${message}`, context ? JSON.stringify(context, null, 2) : "");
24
- }
25
- else {
26
- // In production, use JSON for structured logging
27
- console.error(JSON.stringify(logEntry));
28
- }
29
- }
30
- debug(message, context) {
31
- if (this.debugEnabled) {
32
- this.log("debug", message, context);
33
- }
34
- }
35
- info(message, context) {
36
- this.log("info", message, context);
37
- }
38
- warn(message, context) {
39
- this.log("warn", message, context);
40
- }
41
- error(message, error, context) {
42
- const errorContext = {
43
- ...context,
44
- };
45
- if (error instanceof Error) {
46
- errorContext.error = {
47
- name: error.name,
48
- message: error.message,
49
- stack: error.stack,
50
- };
51
- }
52
- else if (error) {
53
- errorContext.error = error;
54
- }
55
- this.log("error", message, errorContext);
56
- }
57
- }
58
- /**
59
- * Global logger instance
60
- */
61
- export const logger = new Logger();
62
- //# sourceMappingURL=logger.js.map
@@ -1,6 +0,0 @@
1
- /**
2
- * Prompt templates for backend code review
3
- */
4
- export declare const SYSTEM_PROMPT = "You are an expert backend developer and security specialist. Review backend code for security, performance, and architecture.";
5
- export declare function buildUserMessage(code: string, reviewType?: string, language?: string, context?: string): string;
6
- //# sourceMappingURL=backend-review.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"backend-review.d.ts","sourceRoot":"","sources":["../../src/prompts/backend-review.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAO,MAAM,aAAa,kIAAkI,CAAC;AAE7J,wBAAgB,gBAAgB,CAC/B,IAAI,EAAE,MAAM,EACZ,UAAU,GAAE,MAAe,EAC3B,QAAQ,CAAC,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,MAAM,GACd,MAAM,CAWR"}
@@ -1,28 +0,0 @@
1
- /**
2
- * Prompt templates for backend code review
3
- */
4
- export const SYSTEM_PROMPT = `You are an expert backend developer and security specialist. Review backend code for security, performance, and architecture.`;
5
- export function buildUserMessage(code, reviewType = "full", language, context) {
6
- const focusArea = getFocusArea(reviewType);
7
- const languageContext = language ? `Language/Framework: ${language}\n` : "";
8
- const additionalContext = context ? `${context}\n` : "";
9
- return `${languageContext}${additionalContext}${focusArea}
10
-
11
- Code to review:
12
- \`\`\`
13
- ${code}
14
- \`\`\``;
15
- }
16
- function getFocusArea(reviewType) {
17
- switch (reviewType) {
18
- case "security":
19
- return "Focus specifically on security (authentication, authorization, input validation, SQL injection, XSS, CSRF, secrets management).";
20
- case "performance":
21
- return "Focus specifically on backend performance (database queries, caching, async operations, resource usage, scalability).";
22
- case "architecture":
23
- return "Focus specifically on architecture (design patterns, separation of concerns, modularity, maintainability, scalability).";
24
- default:
25
- return "Provide a comprehensive backend review covering security, performance, and architecture.";
26
- }
27
- }
28
- //# sourceMappingURL=backend-review.js.map
@@ -1,6 +0,0 @@
1
- /**
2
- * Prompt templates for code review
3
- */
4
- export declare const SYSTEM_PROMPT = "You are an expert code reviewer. Analyze the code for:\n- Code quality and best practices\n- Potential bugs and edge cases\n- Performance issues\n- Security vulnerabilities\n- Maintainability concerns\n\nProvide specific, actionable feedback.";
5
- export declare function buildUserMessage(code: string, context?: string): string;
6
- //# sourceMappingURL=code-review.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"code-review.d.ts","sourceRoot":"","sources":["../../src/prompts/code-review.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAO,MAAM,aAAa,uPAOa,CAAC;AAExC,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAKvE"}
@@ -1,18 +0,0 @@
1
- /**
2
- * Prompt templates for code review
3
- */
4
- export const SYSTEM_PROMPT = `You are an expert code reviewer. Analyze the code for:
5
- - Code quality and best practices
6
- - Potential bugs and edge cases
7
- - Performance issues
8
- - Security vulnerabilities
9
- - Maintainability concerns
10
-
11
- Provide specific, actionable feedback.`;
12
- export function buildUserMessage(code, context) {
13
- if (context) {
14
- return `${context}\n\nCode to review:\n\`\`\`\n${code}\n\`\`\``;
15
- }
16
- return `Code to review:\n\`\`\`\n${code}\n\`\`\``;
17
- }
18
- //# sourceMappingURL=code-review.js.map
@@ -1,6 +0,0 @@
1
- /**
2
- * Prompt templates for frontend code review
3
- */
4
- export declare const SYSTEM_PROMPT = "You are an expert frontend developer and UX specialist. Review frontend code for best practices.";
5
- export declare function buildUserMessage(code: string, reviewType?: string, framework?: string, context?: string): string;
6
- //# sourceMappingURL=frontend-review.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"frontend-review.d.ts","sourceRoot":"","sources":["../../src/prompts/frontend-review.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAO,MAAM,aAAa,qGAAqG,CAAC;AAEhI,wBAAgB,gBAAgB,CAC/B,IAAI,EAAE,MAAM,EACZ,UAAU,GAAE,MAAe,EAC3B,SAAS,CAAC,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE,MAAM,GACd,MAAM,CAWR"}
@@ -1,28 +0,0 @@
1
- /**
2
- * Prompt templates for frontend code review
3
- */
4
- export const SYSTEM_PROMPT = `You are an expert frontend developer and UX specialist. Review frontend code for best practices.`;
5
- export function buildUserMessage(code, reviewType = "full", framework, context) {
6
- const focusArea = getFocusArea(reviewType);
7
- const frameworkContext = framework ? `Framework: ${framework}\n` : "";
8
- const additionalContext = context ? `${context}\n` : "";
9
- return `${frameworkContext}${additionalContext}${focusArea}
10
-
11
- Code to review:
12
- \`\`\`
13
- ${code}
14
- \`\`\``;
15
- }
16
- function getFocusArea(reviewType) {
17
- switch (reviewType) {
18
- case "accessibility":
19
- return "Focus specifically on accessibility (WCAG compliance, ARIA labels, keyboard navigation, screen reader support).";
20
- case "performance":
21
- return "Focus specifically on frontend performance (bundle size, render optimization, lazy loading, Core Web Vitals).";
22
- case "ux":
23
- return "Focus specifically on user experience (intuitive design, error handling, loading states, responsive design).";
24
- default:
25
- return "Provide a comprehensive frontend review covering accessibility, performance, and user experience.";
26
- }
27
- }
28
- //# sourceMappingURL=frontend-review.js.map
@@ -1,6 +0,0 @@
1
- /**
2
- * Prompt templates for implementation plan review
3
- */
4
- export declare const SYSTEM_PROMPT = "You are an expert software architect and project planner. Review implementation plans before code is written to catch issues early.";
5
- export declare function buildUserMessage(plan: string, reviewType?: string, context?: string): string;
6
- //# sourceMappingURL=plan-review.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"plan-review.d.ts","sourceRoot":"","sources":["../../src/prompts/plan-review.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAO,MAAM,aAAa,wIAAwI,CAAC;AAEnK,wBAAgB,gBAAgB,CAC/B,IAAI,EAAE,MAAM,EACZ,UAAU,GAAE,MAAe,EAC3B,OAAO,CAAC,EAAE,MAAM,GACd,MAAM,CAUR"}
@@ -1,29 +0,0 @@
1
- /**
2
- * Prompt templates for implementation plan review
3
- */
4
- export const SYSTEM_PROMPT = `You are an expert software architect and project planner. Review implementation plans before code is written to catch issues early.`;
5
- export function buildUserMessage(plan, reviewType = "full", context) {
6
- const focusArea = getFocusArea(reviewType);
7
- const additionalContext = context ? `${context}\n` : "";
8
- return `${additionalContext}${focusArea}
9
-
10
- Implementation plan to review:
11
- \`\`\`
12
- ${plan}
13
- \`\`\``;
14
- }
15
- function getFocusArea(reviewType) {
16
- switch (reviewType) {
17
- case "feasibility":
18
- return "Focus specifically on feasibility (technical complexity, resource requirements, potential blockers, dependencies).";
19
- case "completeness":
20
- return "Focus specifically on completeness (missing requirements, edge cases, error handling, testing strategy).";
21
- case "risks":
22
- return "Focus specifically on risks (technical risks, security concerns, scalability issues, maintenance burden).";
23
- case "timeline":
24
- return "Focus specifically on timeline (realistic estimates, task breakdown, critical path, potential delays).";
25
- default:
26
- return "Provide a comprehensive plan review covering feasibility, completeness, risks, and timeline.";
27
- }
28
- }
29
- //# sourceMappingURL=plan-review.js.map